My.Computer.FileSystem Property
Gets an object that provides properties and methods for working with drives, files, and directories.
' Usage
Dim value As Microsoft.VisualBasic.MyServices.FileSystemProxy = My.Computer.FileSystem
' Declaration
Public ReadOnly Property FileSystem As FileSystemProxy
Return Value
This property returns the My.Computer.FileSystem Object for the computer.
Remarks
This property provides easy access to the My.Computer.FileSystem Object.
Example
This example checks to determine whether the folderC:\backup\logs
exists and checks its properties.
Dim logInfo As System.IO.DirectoryInfo
If My.Computer.FileSystem.DirectoryExists("C:\backup\logs") Then
logInfo = My.Computer.FileSystem.GetDirectoryInfo _
("C:\backup\logs")
End If
Requirements
Namespace: Microsoft.VisualBasic.Devices
Class: Computer, ServerComputer
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Project type | Available |
---|---|
Windows Application |
Yes |
Class Library |
Yes |
Console Application |
Yes |
Windows Control Library |
Yes |
Web Control Library |
Yes |
Windows Service |
Yes |
Web Site |
Yes |
Permissions
No permissions are required.
See Also
Reference
My.Computer Object
My.Computer.FileSystem Object
Other Resources
Reading from Files in Visual Basic
Writing to Files in Visual Basic
Creating, Deleting, and Moving Files and Directories in Visual Basic
File, Directory, and Drive Properties in Visual Basic