iwato Posted December 11, 2010 Share Posted December 11, 2010 BACKGROUND: This question is related to a previous and still not yet completed topic dealing with the meaning of the . and .. folder references and the use of recursive techniques to clean and eliminate folders.The MacOS environment allows one to place clippings, references to links, scripts, and a whole host of other miscellany into folders that have the potential -- well, at least in my mind -- to be considered something other than either a file or a folder. Accordingly, applications are also placed into folders, and these are hardly system specific.QUESTION: Is there anything else, besides a file, that could be in a folder that would prevent a folder from being deleted when calling the rmdir() function? To state my question differently, could there ever be anything in a folder besides another folder that the is_file() function would not identify as deletable folder content?Roddy Link to comment Share on other sites More sharing options...
boen_robot Posted December 11, 2010 Share Posted December 11, 2010 In theory, yes. In practice, if there's ever such a thing, an OS will usually present it to file handling APIs as a file and/or a folder, so as long as you're handling both files and folders, you can be sure that the script will work in 99.999% of the situations... the remaining 0.001% is fancy new OS features for which the authors forgot to make the above kind of translation... "buggy" features if you will. Link to comment Share on other sites More sharing options...
iwato Posted December 12, 2010 Author Share Posted December 12, 2010 In theory, yes. In practice, if there's ever such a thing, an OS will usually present it to file handling APIs as a file and/or a folder, so as long as you're handling both files and folders, you can be sure that the script will work in 99.999% of the situations... the remaining 0.001% is fancy new OS features for which the authors forgot to make the above kind of translation... "buggy" features if you will.Thank you, boen_robot.Living in a folder/file world certainly makes life easier, doesn't it?Roddy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.