_unlink

Delete a file.

int _unlink (const char * path);

Required Header
<io.h>

Return Value

This function returns 0 if the operation was successful. -1 indicates an error.

Parameters

path

  The PS file or PO (member) or HFS file path to delete

Remarks

The _unlink function first checks if the file exists, then checks that the file is able to be written before deleting the file (sequential or partitioned) or removing the directory entry (partitioned). In the case of HFS files, the OMVS unlink command is executed without performing any checks.

Low Level I/O

See Also    _open, remove, rename