DirectoryInfo

DirectoryInfo


Represents a directory to modify and retrieve information about.


Implements:

FileSystemInfo 
IObject 

Public:

Properties:

NameDescription
 Attributes (get) Returns the directorys attributes (ReadOnly, Hidden, Archive, ...)  
 Attributes (let) Sets the attributes for the directory.  
 CreationTime (get) Returns the creation time for this directory in local time.  
 CreationTime (let) Sets the creation time for the directory in local time.  
 CreationTime (set) Sets the creation time for the directory in local time.  
 CreationTimeUtc (get) Returns the creation time as UTC time.  
 CreationTimeUtc (let) Sets the creation time as UTC time.  
 CreationTimeUtc (set) Sets the creation time as UTC time.  
 Exists (get) Checks if the directory actually exists.  
 Extension (get) Returns an empty string for directories.  
 FullName (get) Returns the name of the directory, including the full path to the directory.  
 LastAccessTime (get) Returns the last time the directory was accessed in local time.  
 LastAccessTime (let) Sets the time the directory was last accessed in local time.  
 LastAccessTime (set) Sets the time the directory was last accessed in local time.  
 LastAccessTimeUtc (get) Returns the last time the directory was accessed in UTC time.  
 LastAccessTimeUtc (let) Sets the last time the directory was accessed in UTC time.  
 LastAccessTimeUtc (set) Sets the last time the directory was accessed in UTC time.  
 LastWriteTime (get) Returns the last time the directory was written to in local time.  
 LastWriteTime (let) Sets the last time the directory was written to in local time.  
 LastWriteTime (set) Sets the last time the directory was written to in local time.  
 LastWriteTimeUtc (get) Returns the last time the directory was written to in UTC time.  
 LastWriteTimeUtc (let) Sets the last time the directory was written to in UTC time.  
 LastWriteTimeUtc (set) Sets the last time the directory was written to in UTC time.  
 Name (get) Returns the name of the directory this instance represents.  
 Parent (get) Returns the parent directory as a DirectoryInfo object.  
 Root (get) Returns a DirectoryInfo object of the root directory of this instance.  

Methods:

NameDescription
 Create Creates the path represented by this instance.  
 CreateSubdirectory Creates a directory within this instance, returning the new subdirectory.  
 Delete Deletes this directory if it is empty, or all of its contents and itself if Recursive is set to True.  
 Equals Returns a boolean indicating if the value and this object instance are the same instance.  
 GetDirectories Returns a list of directories within this directory.  
 GetFiles Returns a list of file matching the pattern in this directory.  
 GetFileSystemInfos Returns a list of all entries in the directory that match the pattern.  
 GetHashCode Returns a pseudo-unique number identifying this instance.  
 MoveTo Moves this directory and its contents to the specified path.  
 Refresh Reloads all of the attributes and timestamps for the directory.  
 ToString Returns a string representation of this object instance.  

Remarks

The DirectoryInfo object does not verify the existence of the directory until information has to be read or written to that directory.

See Also

Project CorLib Overview

Class DirectoryInfo Overview

Constructors