Method FileTree.Create
Overload
Calls filesystem.enumerate and creates a tree of descendants.
public static FileTree Create(string path, bool onlyDirectories = false, long minSize = 0, bool ignoreInaccessible = true, bool recurseNtfsLinks = false, Func<FEFile, bool> dirFilter = null, Func<FEFile, bool> fileFilter = null)
Parameters
path (string)
Folder path. |
onlyDirectories (bool)
Don't include files. |
minSize (long)
Don't include smaller files and directories. The unit is bytes. |
ignoreInaccessible (bool)
If cannot access some descendant directories, ignore them and don't throw exception. Default |
recurseNtfsLinks (bool)
Enumerate target directories of NTFS links, such as symbolic links and mount points. |
dirFilter (Func<FEFile, bool>)
Called for each descendant directory. If returns |
fileFilter (Func<FEFile, bool>)
Called for each descendant file. If returns |
Returns
FileTree
The root of the tree. You can use its descendants and FileTree.Size. Don't use Info, Name, Path and IsDirectory. |
Exceptions
Exception
Exceptions of filesystem.enumerate. |