My.Computer.FileSystem Object Members
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

My.Computer.FileSystem Object Members 

The My.Computer.FileSystem Object provides properties and methods for working with drives, files, and directories.

Property Description

CurrentDirectory

Gets the current directory.

Drives

Gets information about drives.

SpecialDirectories

Returns the My.Computer.FileSystem.SpecialDirectories Object, which can be used to access special directories, such as Temp or MyDocuments.

Method Description

CombinePath

Returns a properly formatted combined path as a String.

CopyDirectory

Copies a directory.

CopyFile

Copies a file.

CreateDirectory

Creates a directory.

DeleteDirectory

Deletes a directory.

DeleteFile

Deletes a file.

DirectoryExists

Returns a Boolean indicating whether a directory exists.

FileExists

Returns a Boolean indicating whether a file exists.

My.Computer.FileSystem.FindInFiles Method

Returns a read-only collection of strings representing the names of files containing the specified text.

GetDirectories

Returns a String collection representing the path names of subdirectories within a directory.

GetDirectoryInfo

Returns a DirectoryInfo object for the specified path.

GetDriveInfo

Returns a DriveInfo object for the specified path.

GetFileInfo

Returns a FileInfo object for the specified path.

GetFiles

Returns a read-only String collection representing the names of files within a directory.

GetParentPath

Returns a String representing the absolute path of the parent of the provided path.

MoveDirectory

Moves a directory.

MoveFile

Moves a file.

OpenTextFieldParser

Opens a TextFieldParser.

OpenTextFileReader

Opens a TextReader.

OpenTextFileWriter

Opens a TextWriter.

ReadAllBytes

Reads from a binary file.

ReadAllText

Reads from a text file.

RenameDirectory

Renames a directory.

RenameFile

Renames a file.

WriteAllBytes

Writes to a binary file.

WriteAllText

Writes to a text file.

Show:
© 2016 Microsoft