Share via


IFileSystem Interface

Definition

Allows access to local or remote file systems. Obtain this service using FileSystem. The file systems that are available via this service are defined by the file system providers that are registered with it (IFileSystemProvider).

public interface class IFileSystem : Microsoft::VisualStudio::RpcContracts::FileSystem::IFileSystemProvider
public interface IFileSystem : Microsoft.VisualStudio.RpcContracts.FileSystem.IFileSystemProvider
type IFileSystem = interface
    interface IFileSystemProvider
Public Interface IFileSystem
Implements IFileSystemProvider
Implements

Remarks

The file system service refers to files by absolute Uri. Relative Uris are not supported. Uris are divided into two types:

A local Uri can be converted to a remote Uri with ConvertLocalUriToRemoteUriAsync(Uri, String, CancellationToken). A remote Uri can be converted to a local Uri with ConvertRemoteUriToLocalUriAsync(Uri, CancellationToken).

Methods

ConvertLocalFileNameToRemoteUriAsync(String, CancellationToken)

Converts a local filename to a remote Uri using the provider for the scheme returned by GetDefaultRemoteUriSchemeAsync(CancellationToken).

ConvertLocalFileNameToRemoteUriAsync(String, String, CancellationToken)

Converts a local filename to a remote Uri using the provider for remoteScheme.

ConvertLocalUriToRemoteUriAsync(Uri, CancellationToken)

Converts a local Uri to a remote Uri using the provider for the scheme returned by GetDefaultRemoteUriSchemeAsync(CancellationToken).

ConvertLocalUriToRemoteUriAsync(Uri, String, CancellationToken)

Converts a local Uri to a remote Uri using the provider for remoteScheme.

ConvertRemoteFileNameToRemoteUriAsync(String, CancellationToken)

Converts a remote filename to a remote Uri using the provider for the scheme returned by GetDefaultRemoteUriSchemeAsync(CancellationToken).

ConvertRemoteFileNameToRemoteUriAsync(String, String, CancellationToken)

Converts a remote filename to a remote Uri using the provider for remoteScheme.

ConvertRemoteUriToLocalUriAsync(Uri, CancellationToken)

Converts a remote Uri using the provider's Uri scheme to a local Uri.

ConvertRemoteUriToRemoteFileNameAsync(Uri, CancellationToken)

Converts a remote Uri to a remote filename.

CopyAsync(Uri, Uri, Boolean, IProgress<OperationProgressData>, CancellationToken)

Copies a file or directory.

(Inherited from IFileSystemProvider)
CreateDirectoryAsync(Uri, CancellationToken)

Creates a directory.

(Inherited from IFileSystemProvider)
DeleteAsync(Uri, Boolean, IProgress<OperationProgressData>, CancellationToken)

Deletes a file or directory.

(Inherited from IFileSystemProvider)
DownloadFileAsync(Uri, IProgress<OperationProgressData>, CancellationToken)

Downloads a remote file if it has not already been downloaded.

EnumerateDirectoriesAsync(Uri, String, SearchOption, CancellationToken)

Enumerates the child directories of a directory.

(Inherited from IFileSystemProvider)
EnumerateDirectoryEntriesAsync(Uri, String, SearchOption, CancellationToken)

Enumerates the files and child directories of a directory.

(Inherited from IFileSystemProvider)
EnumerateFilesAsync(Uri, String, SearchOption, CancellationToken)

Enumerates the files of a directory.

(Inherited from IFileSystemProvider)
GetDefaultRemoteUriSchemeAsync(CancellationToken)

Gets the default remote Uri scheme.

GetDisplayInfoAsync(String, CancellationToken)

Gets display information for a local file.

GetDisplayInfoAsync(Uri, CancellationToken)

Gets display information for a Uri.

GetInfoAsync(Uri, CancellationToken)

Gets metadata about a file or directory.

(Inherited from IFileSystemProvider)
GetMonikerForFileSystemProviderAsync(String, CancellationToken)

Given the scheme for a file system provider, this method retrieves the provider's ServiceMoniker.

The service moniker can be used to create a ServiceRpcDescriptor for the provider using CreateFileSystemProviderServiceDescriptor(ServiceMoniker).

GetMonikerForRemoteFileSystemProviderAsync(String, CancellationToken)
Obsolete.

Given the scheme for a file system provider, this method retrieves the provider's ServiceMoniker.

The service moniker can be used to create a ServiceRpcDescriptor for the provider using CreateFileSystemProviderServiceDescriptor(ServiceMoniker).

GetRootEntriesAsync(CancellationToken)

Gets the root entries of the provider's namespace. For instance, the root entries for a provider for the local machine's file system might represent the physical drives on the local machine.

(Inherited from IFileSystemProvider)
GetRootEntriesAsync(String, CancellationToken)

Gets the root entries of a provider's namespace. For instance, the root entries for a provider for the local machine's file system might represent the physical drives on the local machine.

GetSupportedSchemesAsync(CancellationToken)

Gets a list of the Uri schemes supported by the file system service.

MoveAsync(Uri, Uri, Boolean, IProgress<OperationProgressData>, CancellationToken)

Moves or renames a file or directory.

(Inherited from IFileSystemProvider)
ReadFileAsync(Uri, PipeWriter, CancellationToken)

Reads the contents of a file into a pipe.

(Inherited from IFileSystemProvider)
UnwatchAsync(WatchResult, CancellationToken)

Stops watching a file or directory for changes.

(Inherited from IFileSystemProvider)
WatchDirectoryAsync(Uri, Boolean, CancellationToken)

Starts watching a directory for changes. A DirectoryEntryChanged event occurs under the following circumstances:

1. A file in the directory specified by uri is created, deleted, or modified.

2. A child directory in the directory specified by uri is created or deleted.

3. If recursive is true, a change described by #1 or #2 occurs in any child directory of the directory specified by uri.

(Inherited from IFileSystemProvider)
WatchFileAsync(Uri, CancellationToken)

Starts watching a file for changes. A DirectoryEntryChanged event occurs when the file specified by uri is created, deleted, or modified.

(Inherited from IFileSystemProvider)
WriteFileAsync(Uri, PipeReader, Boolean, CancellationToken)

Writes data to a file, replacing its entire contents if the file already exists.

(Inherited from IFileSystemProvider)

Events

DirectoryEntryChanged

Occurs when a file passed to WatchFileAsync(Uri, CancellationToken) or directory passed to WatchDirectoryAsync(Uri, Boolean, CancellationToken) changes.

(Inherited from IFileSystemProvider)
RootEntriesChanged

Occurs when the root elements of the provider's namespace change.

(Inherited from IFileSystemProvider)

Applies to