complete-reference-vb_net_46
complete-reference-vb_net_46
Member Purpose
CreateDirectory Creates directories and subdirectories on a given path
Delete Deletes directory contents
Exists Checks if given paths exist
GetCreationTime Retrieves creation dates and times of directories
GetCurrentDirectory Retrieves current working directories of the applications
GetDirectories Retrieves names of subdirectories in specified directories
GetDirectoryRoot Retrieves volume information, root information, or both for the
specified paths
GetFiles Retrieves the names of files in the specified directories
GetFileSystem Entries Retrieves the names of all files and subdirectories in the specified
directory
GetLastAccessTime Retrieves the date and time the specified file or directory was last
accessed
GetLastWriteTime Retrieves the date and time the specified file or directory was last
written to
GetLogicalDrives Retrieves the names of the logical drives on this computer; for example,
"c:\"
GetParent Retrieves the parent directory of the specified path, including both
absolute and relative paths
Move Moves files or folders and directory contents to a new location
SetCreationTime Lets you set the creation date and time for files or directories
SetCurrentDirectory Lets you create the current working directory
SetLastAccessTime Lets you set the date and time the specified file or directory was last
accessed
SetLastWriteTime Lets you set the date and time a directory was last written to
The FileInfo Class
This class contains methods that provide the same service as the File class. The main difference between the
two classes is that FileInfo's methods are instance methods and the class contains a constructor that lets you
create it as an object. What you get is a reference variable to an object that represents or abstracts a file. The
class also provides a handful of properties that make reporting on a file easier. The members of FileInfo (sans
methods inherited from Object) are listed in Table 15−17.
Member Purpose
Attributes (p) Gets or sets the FileAttributes of the current FileSystemInfo object
CreationTime (p) Gets or sets the creation time of the current FileSystemInfo object
Directory (p) Gets an instance of the parent directory
DirectoryName (p) Gets a string representing the directory's full path
Exists (p) Gets a value indicating whether a file exists
Extension (p) Gets the string representing the extension part of the file
FullName (p) Gets the full path of the directory or file
530