JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Using the Directory class

Visual Basic .NET allows you to work with folders and drives via the Directory class. This class gives you the ability to create, edit, and delete folders, as well as maintain the drives on your system. Here is the hierarchy of this class:

Object
   Directory

You can find the public class (shared) methods of this class in Table 13.21.

Table 13.21: Noteworthy public class (shared) methods of the Directory class.

Method

Means

CreateDirectory

Creates directories.

Delete

Deletes a directory (and any directory contents!).

Exists

True if a directory exists.

GetCreationTime

Gets a directory's creation date and time.

GetCurrentDirectory

Gets the current (default) directory.

GetDirectories

Gets the directories in the current directory.

GetDirectoryRoot

Gets the root part of a path.

GetFiles

Gets the files in a directory.

GetFileSystemEntries

Gets the file system entries for a path.

GetLastAccessTime

Gets the date and time a directory was last accessed.

GetLastWriteTime

Gets the date and time a directory was last written.

GetLogicalDrives

Gets the names of the computer's logical drives.

GetParent

Gets the parent directory.

Move

Moves a directory (including its contents).

SetCreationTime

Sets a directory's creation time.

SetCurrentDirectory

Sets the current directory.

SetLastAccessTime

Sets a directory's last accessed date and time.

SetLastWriteTime

Sets a directory's last written-to date and time.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor