


Do not be tempted to walk the directory items backwards (from Count downto 0), even if you see many recommendations for doing so. To delete items from a folder, follow the above rules as well.Instead, first collect all items into an array of FolderItems, then walk the array items and enter any folders you encounter. If you want to recurse into subfolders, do not go depth-first.If you iterate backward, it may get very slow if the directory contains a few hundred or even more items. Always iterate forward, starting at index 0 and ending with the index that matches the folder's Count.If you walk directory contents, follow these rules: Xojo Cloud's file system is case sensitive.Īvoid invoking functions such as Count, Child and IgnoreAlias multiple times for the same target because these functions are time-intensive (especially on macOS). If you do not, you may find that files cannot be found when your app is running on Linux. This means that if you are creating apps to deploy on Linux (including web apps deployed to Linux servers), you need to ensure that your filenames correctly match case.
#XOJO FOLDERITEM WINDOWS#
PropertiesĬonstructor(path as String, pathMode as FolderItem.PathModes, followAlias as Boolean = true)īe aware that file systems on macOS and Windows are generally not case-sensitive, while file systems on Linux usually are case-sensitive. Common ways to create FolderItems are by using the Constructor, SpecialFolder along with the FolderItem.Child method or using the various FolderItem shared methods for selecting files. FolderItem class objects represent files, applications, or folders.
