Programming Guide


Deletes a file

int sm_file_remove(char *path);

Specifies the file to delete. In three-tier applications, the path can include a file access server ID in this format:

If you omit server-id, Panther looks for the file locally.



sm_file_remove deletes a file. In a three-tier environment, you can remove a file from a remote file access server by prefixing the file path with the server ID. For example, this JPL deletes file rpt.out from server oak after moving it to the local workstation client:

vars err = ""
if sm_file_exists("oak!/disk/reports/rpt.out")
err = sm_file_copy \
("oak!/disk/reports/rpt.out", "c:\reports\rpt.out", "b")
if err == 0 && cleanup() == 1
call sm_file_remove("oak!/disk/reports/rpt.out")

See Also

sm_file_copy, sm_file_exists, sm_file_move