246. Deleting a File

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

MPI_FILE_DELETE(filename, info)
IN filenamename of file to delete (string)
IN infoinfo object (handle)

int MPI_File_delete(char *filename, MPI_Info info)
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 , page 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 , page I/O Error Handling ).

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

Return to MPI-2.1 Standard Index
Return to MPI Forum Home Page

MPI-2.0 of July 1, 2008
HTML Generated on July 6, 2008