G'day,

The hyperspec [1] states that DELETE-FILE should signal an error of type 
FILE-ERROR if it cannot succeed in deleting a file. ECL currently signals a 
SIMPLE-ERROR.

> (delete-file "/tmp/non-existent.dylib")

Condition of type: SIMPLE-ERROR
Cannot delete the directory "/tmp/non-existent.dylib".
C library explanation: No such file or directory.



DELETE-FILE is implemented in src/c/unixfsys.d (I think) and contains a call to 
FElibc_error, which calls FEerror. I would send a patch for DELETE-FILE, but 
there are other functions in that file that signal a SIMPLE-ERROR rather than a 
FILE-ERROR. e.g.

FILE-AUTHOR
RENAME-FILE

These may also be considerations but would perhaps break backward compatibility:
EXT::CHDIR
SI::MKDIR
SI::CHMOD

Handling and signalling file errors is fairly common in practice so I am 
wondering if a new function "FElibc_file_error" should be created and added to 
external.h.

Thanks
Mark

[1] http://www.lispworks.com/documentation/HyperSpec/Body/f_del_fi.htm
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to