The following tables list the members exposed by FileSystem.

      Protected Constructors

      NameDescription
      Protected ConstructorsFileSystem Constructor()Initializes a new instance of the FileSystem class.
      Top

      Public Properties

      NameDescription
      Public PropertiesStatic MemberBytesPerSecondUpdateIntervalGets or sets the number of milliseconds to update the BytesPerSecond property. The default value is 400 ms.
      Public PropertiesDirectorySeparatorsGets an array containing the characters that are directory separators.
      Virtual Public PropertiesFileInfoPartsToGetBeforeTransferringSpecifies which information of the source file will be obtained before transferring.
      Virtual Public PropertiesInvalidFileNameCharsGets or sets an array containing the characters that are not allowed in file or directory names, or null if this file system accepts all characters in file name.
      Virtual Public PropertiesInvalidFileNameCharsSubstitutionGets or sets the substitution character that will replace the invalid characters found in file or directory name while copying files from another file system.
      Public PropertiesInvalidPathCharsGets an array containing the characters that are not allowed in path names.
      Public PropertiesInvokeFromCurrentThreadsGets a value indicating whether to raise events from the current thread or to use a SynchronizationContext object available when an asynchronous operation was started. The default value is false.
      Virtual Public PropertiesProgressIntervalGets or sets the length of the interval in milliseconds between the Progress events fired during transfer. The default value is 100 ms.
      Virtual Public PropertiesRestoreFilePropertiesGets or sets a boolean value indicating whether to restore file properties including LastWriteTime and CreationTime after downloading or uploading if possible.
      Virtual Public PropertiesServerTimeZoneOffsetThis value is used to synchronize the CreationTime and LastWriteTime of files after a transfer. The default value is TimeSpan.Zero.
      Virtual Public PropertiesThreadIdGets the thread id.
      Virtual Public PropertiesTraceListenerManagerGets or sets the TraceListenerManager object to which the log messages generated by this object are sent. If not set, the Default trace listener manager is used. If this property is set to null, all messages from this object wont be logged.
      Virtual Public PropertiesTraceSourceGets or sets the source object for all log messages generated by this object. If not set, the property returns the current object.
      Public PropertiesUniqueIdGets the unique object id.
      Top

      Public Methods

      NameDescription
      Public MethodsStatic MemberCalculateTimeDiffCalculates the time difference between the source and the dest file systems.
      Virtual Public MethodsCancelOverloaded. Cancels all the operations.
      Virtual Public MethodsCombinePathOverloaded. Combines two path strings.
      Public MethodsCopyFromOverloaded. Copies data in a stream to the specified destination file on this system.
      Public MethodsCopyFromAsyncOverloaded. Asynchronously copies data in a stream to the specified destination file on this system.
      Public MethodsStatic MemberCopyToOverloaded. Copies a file from this file system to another file system.
      Public MethodsStatic MemberCopyToAsyncOverloaded. Asynchronously copies a file from this file system to another file system.
      Virtual Public MethodsCreateDirectoryCreates an empty directory.
      Public MethodsCreateDirectoryAsyncOverloaded. Begins an asynchronous CreateDirectory operation. Creates an empty directory.
      Public MethodsCreateFileInfoOverloaded. Creates a new instance of the FileInfoBase and set appropriate file information.
      Virtual Public MethodsDeleteOverloaded. Deletes files or directories and, if indicated, any subdirectories matching the specified search condition on the filesToDelete list.
      Public MethodsDeleteAsyncOverloaded. Asynchronously deletes files or directories and, if indicated, any subdirectories matching the specified search condition on the filesToDelete list. This method only deletes the items in the specified directory if the baseDirectoryPath parameter does not end with a directory separator (e.g. '/' or '\'). To remove the whole directory, you should add a directory separator character at the end of that parameter.
      Public MethodsDeleteDirectoryOverloaded. Deletes the specified directory and, if indicated, any subdirectories and files in the directory.
      Public MethodsDeleteDirectoryAsyncOverloaded. Asynchronously deletes the specified directory and, if indicated, any subdirectories and files in the directory.
      Virtual Public MethodsDeleteFileOverloaded. Deletes the specified file.
      Public MethodsDeleteFileAsyncOverloaded. Asynchronously deletes the specified file.
      Virtual Public MethodsDirectoryExistsDetermines whether the given path refers to an existing directory.
      Public MethodsDirectoryExistsAsyncOverloaded. Asynchronously detects whether the specified directory exists on the file system.
      Public MethodsDisposeReleases all used resources.
      Public MethodsEnsuresDirectoryCreatedEnsures the specified directory exists on the file system. If the specified directory does not exist, a new one is to be created.
      Virtual Public MethodsFileExistsOverloaded. Determines whether the specified file exists.
      Public MethodsFileExistsAsyncOverloaded. Asynchronous detects whether the specified file exists on the file system.
      Public MethodsStatic MemberGetCommonChecksumAlgorithmsGets checksum algorithms that both file system have in common.
      Virtual Public MethodsGetCurrentDirectoryGets the current working directory of the file system.
      Public MethodsGetCurrentDirectoryAsyncOverloaded. Asynchronously gets the current working directory of the file system.
      Virtual Public MethodsGetDirectoryNameReturns the directory information for the specified path string.
      Public MethodsGetDirectorySizeOverloaded. Returns total size of the specified directories.
      Public MethodsGetDirectorySizeAsyncOverloaded. Asynchronously calculates total size of the specified directory.
      Virtual Public MethodsGetFileChecksumOverloaded. Returns the checksum of the specified file.
      Public MethodsGetFileChecksumAsyncOverloaded. Begins an asynchronous GetFileChecksum operation. Retrieves the checksum of the specified file.
      Virtual Public MethodsGetFileLengthGets the size of the specified file.
      Public MethodsGetFileLengthAsyncOverloaded. Asynchronously retrieves the size of the specified file.
      Virtual Public MethodsGetFileNameReturns the file name and extension of the specified path string.
      Public MethodsGetFullPathReturns a full path of the specified path.
      Virtual Public MethodsGetItemInfoReturns a FileInfoBase object containing information of the specified file or directory.
      Public MethodsGetItemInfoAsyncOverloaded. Asynchronously retrieves a FileInfoBase containing the information about the specified file or directory.
      Virtual Public MethodsGetLastWriteTimeReturns the date and time the specified file or directory was last written to.
      Public MethodsGetLastWriteTimeAsyncOverloaded. Asynchronous retrieves the modification date and time of the specified file.
      Virtual Public MethodsGetSupportedChecksumTypesReturns checksum types supported by the file system.
      Public MethodsIsCancelingOverloaded. Returns a boolean value indicating whether user has called the Cancel method.
      Virtual Public MethodsIsPathRootedGets a value indicating whether the specified path string contains absolute or relative path information.
      Public MethodsListDirectoryOverloaded. Lists all files and subdirectories in the specified directory.
      Public MethodsListDirectoryAsyncOverloaded. Asynchronously lists files and subdirectories in the specified directory that match the specified search condition.
      Virtual Public MethodsListNameOverloaded. Returns a list of file and directory names in the current directory.
      Public MethodsListNameAsyncOverloaded. Begins an asynchronous ListName operation. Retrieves the list of file and directory names in the specified directory.
      Public MethodsMoveOverloaded. Moves files that match the search condition specified in the options parameter from the specified directory to the destination directory using multiple threads. This method only moves the items of the specified directory if the sourcePath parameter does not end with a directory separator (e.g. '/' or '\'). To move the whole directory, use the Rename method instead.
      Public MethodsMoveAsyncOverloaded. Asynchronously moves files that match the search condition specified in the options parameter from the specified directory to the destination directory on this file system. This method only moves the items of the specified directory if the sourcePath parameter does not end with a directory separator (e.g. '/' or '\'). To move the whole directory, use the Rename method instead.
      Public MethodsNormalizePathOverloaded. Normalizes a path. This method normalizes path like "\my folder\\my sub folder/sub folder/\my file" to "/my folder/my sub folder/sub folder/my file" if directory separator character is '/'.
      Public MethodsQuickSynchronizeOverloaded. Synchronizes the specified local directory with the specified source directory with the specified options.
      Public MethodsQuickSynchronizeAsyncOverloaded. Initiates an asynchronous operation to synchronize contents of a source directory and a local directory.
      Virtual Public MethodsRenameMoves a specified file to a new location, providing the option to specify a new file name.
      Public MethodsRenameAsyncOverloaded. Begins an asynchronous Rename operation. Renames a file or directory on the file system.
      Public MethodsSearchOverloaded. Searches for files and directories that match the specified search pattern, if specified, in the directoryPath.
      Public MethodsSearchAsyncOverloaded. Searches for files and directories that match the specified search conditions.
      Virtual Public MethodsSetCurrentDirectorySets the file system's current working directory to the specified directory.
      Public MethodsSetCurrentDirectoryAsyncOverloaded. Begins an asynchronous SetCurrentDirectory operation.
      Virtual Public MethodsSetLastWriteTimeSets the date and time at which the specified file was last written.
      Public MethodsSetLastWriteTimeAsyncOverloaded. Begins an asynchronous SetLastWriteTime operation. Sets the modification date and time of the specified file.
      Public MethodsStatic MemberTransferFilesOverloaded. Transfers files from the specified source file system to the specified destination file system.
      Public MethodsStatic MemberTransferFilesAsyncOverloaded. Asynchronously transfers files from the specified source file system to the specified destination file system.
      Top

      Protected Methods

      NameDescription
      Virtual Protected MethodsDisposeReleases all used resources.
      Protected MethodsFinalizeOverridden. Releases all used unmanaged resources.
      Virtual Protected MethodsGetItemInfoPartsBeforeTransferringIndicates whether the file system should obtains information of the source files before transferring.
      Virtual Protected MethodsOnCopyFromCompletedRaises the CopyFromCompleted event.
      Virtual Protected MethodsOnCopyToCompletedRaises the CopyToCompleted event.
      Virtual Protected MethodsOnCreateDirectoryCompletedRaises the CreateDirectoryCompleted event.
      Virtual Protected MethodsOnDeleteCompletedRaises the DeleteCompleted event.
      Virtual Protected MethodsOnDeleteDirectoryCompletedRaises the DeleteDirectoryCompleted event.
      Virtual Protected MethodsOnDeleteFileCompletedRaises the DeleteFileCompleted event.
      Virtual Protected MethodsOnDirectoryExistsCompletedRaises the DirectoryExistsCompleted event.
      Virtual Protected MethodsOnFileExistsCompletedRaises the FileExistsCompleted event.
      Virtual Protected MethodsOnGetCurrentDirectoryCompletedRaises the GetCurrentDirectoryCompleted event.
      Virtual Protected MethodsOnGetDirectorySizeCompletedRaises the GetDirectorySizeCompleted event.
      Virtual Protected MethodsOnGetFileChecksumCompletedRaises the GetFileChecksumCompleted event.
      Virtual Protected MethodsOnGetFileLengthCompletedRaises the GetFileLengthCompleted event.
      Virtual Protected MethodsOnGetItemInfoCompletedRaises the GetItemInfoCompleted event.
      Virtual Protected MethodsOnGetLastWriteTimeCompletedRaises the GetLastWriteTimeCompleted event.
      Virtual Protected MethodsOnListDirectoryCompletedRaises the ListDirectoryCompleted event.
      Virtual Protected MethodsOnListNameCompletedRaises the ListNameCompleted event.
      Virtual Protected MethodsOnMoveFilesCompletedRaises the MoveCompleted event.
      Virtual Protected MethodsOnProgressRaises the Progress event.
      Virtual Protected MethodsOnQuickSynchronizeCompletedRaises the QuickSynchronizeCompleted event.
      Virtual Protected MethodsOnRenameCompletedRaises the RenameCompleted event.
      Virtual Protected MethodsOnSearchCompletedRaises the SearchCompleted event.
      Virtual Protected MethodsOnSetCurrentDirectoryCompletedRaises the SetCurrentDirectoryCompleted event.
      Virtual Protected MethodsOnSetLastWriteTimeCompletedRaises the SetLastWriteTimeCompleted event.
      Virtual Protected MethodsOnThreadStateChangedRaises the ThreadStateChanged event.
      Virtual Protected MethodsOnTransferConfirmRaises the TransferConfirm event.
      Top

      Public Events

      NameDescription
      Public EventsCopyFromCompletedOccurs when an asynchronous CopyFromAsync operation completes.
      Public EventsCopyToCompletedOccurs when an asynchronous CopyToAsync operation completes.
      Public EventsCreateDirectoryCompletedOccurs when an asynchronous CreateDirectoryAsync operation completes.
      Public EventsDeleteCompletedOccurs when an asynchronous DeleteAsync operation completes.
      Public EventsDeleteDirectoryCompletedOccurs when an asynchronous DeleteDirectoryAsync operation completes.
      Public EventsDeleteFileCompletedOccurs when an asynchronous DeleteFileAsync operation completes.
      Public EventsDirectoryExistsCompletedOccurs when an asynchronous DirectoryExistsAsync operation completes.
      Public EventsFileExistsCompletedOccurs when an asynchronous FileExistsAsync operation completes.
      Public EventsGetCurrentDirectoryCompletedOccurs when an asynchronous GetCurrentDirectoryAsync operation completes.
      Public EventsGetDirectorySizeCompletedOccurs when an asynchronous GetDirectorySizeAsync operation completes.
      Public EventsGetFileChecksumCompletedOccurs when an asynchronous GetFileChecksumAsync operation completes.
      Public EventsGetFileLengthCompletedOccurs when an asynchronous GetFileLengthAsync operation completes.
      Public EventsGetItemInfoCompletedOccurs when an asynchronous GetItemInfoAsync operation completes.
      Public EventsGetLastWriteTimeCompletedOccurs when an asynchronous GetLastWriteTimeAsync operation completes.
      Public EventsListDirectoryCompletedOccurs when an asynchronous ListDirectoryAsync operation completes.
      Public EventsListNameCompletedOccurs when an asynchronous ListNameAsync operation completes.
      Public EventsMoveCompletedOccurs after a MoveAsync call has been completed.
      Public EventsProgressOccurs when a block of data is transferred, or a file operation is being or has been executed.
      Public EventsQuickSynchronizeCompletedOccurs when an asynchronous QuickSynchronizeAsync operation completes.
      Public EventsRenameCompletedOccurs when an asynchronous RenameAsync operation completes.
      Public EventsSearchCompletedOccurs when an asynchronous search operation completes.
      Public EventsSetCurrentDirectoryCompletedOccurs when an asynchronous SetCurrentDirectoryAsync operation completes.
      Public EventsSetLastWriteTimeCompletedOccurs when an asynchronous SetLastWriteTimeAsync operation completes.
      Public EventsThreadStateChangedOccurs when the state of the thread is changed while in a multi-thread file transfer.
      Public EventsTransferConfirmOccurs when the file system has detected an issue while transferring files such as existing file found, symlink detected or an error encountered.
      Top

      See Also