15.2.3. Deleting a File

PreviousUpNext
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)
C binding
int MPI_File_delete(const char *filename, MPI_Info info)
Fortran 2008 binding
MPI_File_delete(filename, info, ierror)

CHARACTER(LEN=*), INTENT(IN) :: filename
TYPE(MPI_Info), INTENT(IN) :: info
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_FILE_DELETE(FILENAME, INFO, IERROR)

CHARACTER*(*) FILENAME
INTEGER INFO, IERROR

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 file error handler (see Section I/O Error Handling).


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


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

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023