Article # 163, added by Geoworks, historical record
| first | previous | index | next | last |

File operations applied to directories.




Q. Do file operations apply to directories. In other words, can you
   rename a file by calling FileRename?

A. In this case, yes, renaming a directory is done using
   FileRename. The File Manager source code at
   http://members.aol.com/nfiedler/software.html does
   renaming, moving, copying and deleting of files and
   directories.

   Here is a summary of operations for files and directories:

   Operation    File        Folder (aka directory)
   -----------------------------------------------
   Rename       FileRename  FileRename
   Delete       FileDelete  FileDeleteDir
   Move         FileMove    n/a
   Copy         FileCopy    n/a

   In the case of moving or copying directories you'll have to manually
   do the necessary FileDeleteDir and FileCreateDir. You'll also have
   to move all of the contents of the directories manually. Again, see
   the File Manager source code for examples.