Delete files and directories: Difference between revisions
Jump to navigation
Jump to search
(imported material) |
(No difference)
|
Latest revision as of 20:36, 4 May 2025
Problem I want to delete a file or directory, how do I do it ?
Solution. One way is following the next snippet. Observe well there is an asymmetry in the way the delete
message behaves in case the file or directory is non existent.
"No error if file does not exist" '/home/p/testFile.txt' asFileEntry delete. "There is an error if the directory does not exist " '/home/p/testDir' asDirectoryEntry delete.
Dr. Nicola Mingotti last edited this on 06-Sep-2021. Tested in Cuis5.0-4834.image.