Namespace System.IO Creatable No Description The File class has a number of members that allow you to retrieve information about files, and to move and delete files. All of the members of the File class are shared methods, so they can be called without instantiating any objects. The following table lists some of the more useful and interesting members of the File class. Those marked with an asterisk (*) have separate entries in this chapter. Member | Description |
|---|
AppendText Method | Opens an existing text file, ready to add additional text to the end of the file | Copy Method | Copies an existing file to a new location | Create, CreateText Methods | Opens a new file for output | Delete Method | Deletes an existing file | Exists Method * | Tests a file path to see if it exists | GetAttributes Method | Retrieves the attributes for a given file | GetCreationTime Method | Retrieves the date and time that a file was originally created | GetLastAccessTime Method | Retrieves the date and time that a file was last accessed | GetLastWriteTime Method | Retrieves the date and time that a file was last written | Move Method | Moves an existing file to a new location | Open, OpenRead, OpenText, OpenWrite Methods | Opens an existing file for input or output | SetAttributes Method | Modifies the attributes of an existing file |
Version Differences Visual Basic 2005 includes a My.Computer.FileSystem object that provides file management functionality. See Also Directory Class |