## 9.2.3. Deleting a File

Up: File Manipulation Next: Resizing a File Previous: Closing a File

MPI_FILE_DELETE(filename, info)
IN filename | name of file to delete (string)
IN info | info object (handle)

`int MPI_File_delete(char *filename, MPI_Info info)
` `MPI_FILE_DELETE(FILENAME, INFO, IERROR)
CHARACTER*(*) FILENAME
INTEGER INFO, IERROR
` `static void MPI::File::Delete(const char* filename, const MPI::Info& info)
`

MPI_FILE_DELETE deletes the file identified by the file name filename. If the file does not exist, MPI_FILE_DELETE raises an error in the class MPI_ERR_NO_SUCH_FILE.

The info argument can be used to provide information regarding file system specifics (see Section File Info ). The constant MPI_INFO_NULL refers to the null info, and can be used when no info needs to be specified.

If a process currently has the file open, the behavior of any access to the file (as well as the behavior of any outstanding accesses) is implementation dependent. In addition, whether an open file is deleted or not is also implementation dependent. If the file is not deleted, an error in the class MPI_ERR_FILE_IN_USE or MPI_ERR_ACCESS will be raised. Errors are raised using the default error handler (see Section I/O Error Handling ).

Up: File Manipulation Next: Resizing a File Previous: Closing a File

Return to MPI-2 Standard Index
Return to MPI 1.1 Standard Index
Return to MPI Forum Home Page

MPI-2.0 of July 18, 1997
HTML Generated on September 10, 2001