Click or drag to resize

DirectoryInfo Class

Provides an instance for creating, moving, deleting, and enumerating through directories and subdirectories.
Inheritance Hierarchy
SystemObject
  Crestron.SimplSharp.CrestronIOFileSystemInfo
    Crestron.SimplSharp.CrestronIODirectoryInfo

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public sealed class DirectoryInfo : FileSystemInfo

The DirectoryInfo type exposes the following members.

Constructors
 NameDescription
Public methodDirectoryInfo Initialize the DirectoryInfo class with the specified path.
Top
Properties
 NameDescription
Public propertyAttributes Gets or sets the FileAttributes of the current object.
(Overrides FileSystemInfoAttributes)
Public propertyCreationTime Gets the creation time of the current object.
(Overrides FileSystemInfoCreationTime)
Public propertyExists Determines if the current directory exists on the system.
(Overrides FileSystemInfoExists)
Public propertyExtension Gets the string representing the extension part of the file.
(Overrides FileSystemInfoExtension)
Public propertyFullName Return the full path of the Directory
(Overrides FileSystemInfoFullName)
Public propertyLastAccessTime Gets or sets the time the current file or directory was last accessed.
(Overrides FileSystemInfoLastAccessTime)
Public propertyLastWriteTime Gets or sets the time when the current file or directory was last written to.
(Overrides FileSystemInfoLastWriteTime)
Public propertyName Return the name of the current directory.
(Overrides FileSystemInfoName)
Public propertyParent Get the instance of the Parent Directory.
Public propertyRoot Get the instance of the root directory.
Top
Methods
 NameDescription
Public methodCreate Create the current directory.
Public methodCode exampleCreateSubdirectory Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the DirectoryInfo class.
Public methodDelete Delete the current directory.
(Overrides FileSystemInfoDelete)
Public methodCode exampleDelete(Boolean) Deletes this instance of a DirectoryInfo, specifying whether to delete subdirectories and files.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetDirectories Return the subdirectories of the current instance.
Public methodGetDirectories(String) Return the subdirectories of the current instance that match the specified search pattern.
Public methodGetFiles Return the files of the current directory.
Public methodGetFiles(String) Return the files of the current directory that match the specified search pattern.
Public methodCode exampleGetFileSystemInfos Returns an array of strongly typed FileSystemInfo entries representing all the files and subdirectories in a directory.
Public methodCode exampleGetFileSystemInfos(String) Retrieves an array of strongly typed FileSystemInfo objects representing the files and subdirectories matching the specified search criteria.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodMoveTo Moves the specified directory and contents to the destination location.
Public methodRefresh Refreshes the state of the object.
(Overrides FileSystemInfoRefresh)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also