System::IO::DirectoryInfo class

DirectoryInfo class

Represents a file system path, a directory referred to by this path and provides instance methods for manipulating directories. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class DirectoryInfo : public System::IO::FileSystemInfo

Methods

MethodDescription
Create()Creates a directory at the path represented by the current object.
CreateSubdirectory(const String&)Creates subdirectories on the specified path.
Delete() overrideRemoves the directory referred to by the path represented by the current object if the directory is empty.
Delete(bool)Removes the directory referred to by the path represented by the current object. A parameter specifies if the content of the directory should be recursively removed if the directory is not empty.
DirectoryInfo(const String&)Constructs an instnace of DirectoryInfo class on the specified path.
EnumerateDirectories()Returns enumerable collection containing all directories located in the directory represented by the current object.
EnumerateDirectories(const String&)Searches for the directories that satisfy the specified search criteria in the directory represented by the current object.
EnumerateDirectories(const String&, SearchOption)Searches for the directories that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
EnumerateFiles()Returns enumerable collection containing all files located in the directory represented by the current object.
EnumerateFiles(const String&)Searches for the files that satisfy the specified search criteria in the directory represented by the current object.
EnumerateFiles(const String&, SearchOption)Searches for the files that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
EnumerateFileSystemInfos()Returns enumerable collection containing all files and directories located in the directory represented by the current object.
EnumerateFileSystemInfos(const String&)Searches for the files and directories that satisfy the specified search criteria in the directory represented by the current object.
EnumerateFileSystemInfos(const String&, SearchOption)Searches for the files and directories that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
get_Exists() overrideDetermines if the path represented by the current object refers to existing directory.
get_Name() overrideReturns the name of the entity referred to by the path represented by the current object.
get_Parent()Returns a shared pointer to DirectoryInfo object that represents a path referring the parent directory of the directory represented by the current object.
get_Root()Returns a shared pointer to DirectoryInfo object that represents a path referring the root directory of the directory represented by the current object.
GetDirectories()Returns an array containing shared pointers to DirectoryInfo objects representing all directories located in the directory represented by the current object.
GetDirectories(const String&)Searches for the directories that satisfy the specified search criteria in the directory represented by the current object.
GetDirectories(const String&, SearchOption)Searches for the directories that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
GetFiles()Returns an array containing shared pointers to FileInfo objects representing all directories located in the directory represented by the current object.
GetFiles(const String&)Searches for the files that satisfy the specified search criteria in the directory represented by the current object.
GetFiles(const String&, SearchOption)Searches for the files that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
GetFileSystemInfos()Returns an array containing shared pointers to FileSystemInfo objects representing all files and directories located in the directory represented by the current object.
GetFileSystemInfos(const String&)Searches for the files and directories that satisfy the specified search criteria in the directory represented by the current object.
GetFileSystemInfos(const String&, SearchOption)Searches for the files and directories that satisfy the specified search criteria either in the directory represented by the current object or in the whole directory tree rooted in the directory represented by the current object.
MoveTo(const String&)Moves the directory represented by the current object and all its contentto the specified location.
ToString() const overrideReturns a string containing the path represented by the current object.

See Also