SpecialDirectoriesProxy Class

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Provides properties for accessing commonly referenced directories.

Namespace:   Microsoft.VisualBasic.MyServices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

System.Object
  Microsoft.VisualBasic.MyServices.SpecialDirectoriesProxy

[HostProtectionAttribute(SecurityAction.LinkDemand, Resources = HostProtectionResource.ExternalProcessMgmt)]
public class SpecialDirectoriesProxy

NameDescription
System_CAPS_pubpropertyAllUsersApplicationData

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the Application Data directory for the all users.

System_CAPS_pubpropertyCurrentUserApplicationData

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the Application Data directory for the current user.

System_CAPS_pubpropertyDesktop

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the Desktop directory.

System_CAPS_pubpropertyMyDocuments

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the My Documents directory.

System_CAPS_pubpropertyMyMusic

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the My Music directory.

System_CAPS_pubpropertyMyPictures

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the My Pictures directory.

System_CAPS_pubpropertyProgramFiles

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path pointing to the Program Files directory.

System_CAPS_pubpropertyPrograms

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the Programs directory.

System_CAPS_pubpropertyTemp

This API supports the product infrastructure and is not intended to be used directly from your code. Gets a path name pointing to the Temp directory.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

If the path for the referenced directory is empty, usually due to the operating system not supporting the directory, a DirectoryNotFoundException exception is thrown.

No backslash (\) appears at the end of the path.

The following table lists examples of tasks involving the My.Computer.FileSystem.SpecialDirectories object.

To

See

Read from the MyDocuments directory

How to: Retrieve the Contents of the My Documents Directory in Visual Basic

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

This example returns the filePath for the user's Desktop directory and displays it.

Dim filePath As String
filePath = My.Computer.FileSystem.SpecialDirectories.Desktop
MsgBox(filePath)

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: