Next: , Previous: , Up: Files   [Index]


2.25 Delete a file: ncmpi_delete

The function ncmpi_delete deletes a file, without check if it is a NetCDF file.

Operational Mode

This API is an independent subroutine.

Usage

int ncmpi_delete(const char *filename,
                 MPI_Info    info);
filename

Name of the file to be deleted.

info

MPI info object, containing file hints to be passed to MPI-IO library.

Return Error Codes

ncmpi_delete returns the value NC_NOERR if no errors occurred. Otherwise, the returned status indicates an error. Possible causes of errors include:

Example

Here is an example using ncmpi_delete.

#include <pnetcdf.h>
   ...
int status;
MPI_Info info = MPI_INFO_NULL;
   ...
status = ncmpi_delete("foo.nc", info);
if (status != NC_NOERR) handle_error(status);

Next: , Previous: , Up: Files   [Index]