C# Класс NLight.IO.IOHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
AreSameFile ( FileInfo fileInfoA, FileInfo fileInfoB ) : bool
AreSameFile ( string filePathA, string filePathB ) : bool
Copy ( Stream source, Stream destination, int bufferSize = DefaultBufferSize, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task
Copy ( string sourceFilePath, string destinationFilePath, OverwriteMode overwriteMode = OverwriteMode.AlwaysOverwrite, CopyOptions options = CopyOptions.AllowHardLinkCreation, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task
DeleteEmptyDirectories ( string root, bool deleteRoot = false ) : void
EnumerateDirectories ( string path, string searchPattern = "*.*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable
EnumerateFiles ( string path, string searchPattern = "*.*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable
Move ( string sourceFilePath, string destinationFilePath, OverwriteMode overwriteMode = OverwriteMode.AlwaysOverwrite, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task

Приватные методы

Метод Описание
SafeGetFileSystemEnumerable ( Func getEnumerable ) : IEnumerable

Описание методов

AreSameFile() публичный статический Метод

public static AreSameFile ( FileInfo fileInfoA, FileInfo fileInfoB ) : bool
fileInfoA System.IO.FileInfo
fileInfoB System.IO.FileInfo
Результат bool

AreSameFile() публичный статический Метод

public static AreSameFile ( string filePathA, string filePathB ) : bool
filePathA string
filePathB string
Результат bool

Copy() публичный статический Метод

public static Copy ( Stream source, Stream destination, int bufferSize = DefaultBufferSize, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task
source Stream
destination Stream
bufferSize int
cancellationToken System.Threading.CancellationToken
progressCallback long>.Action
Результат Task

Copy() публичный статический Метод

public static Copy ( string sourceFilePath, string destinationFilePath, OverwriteMode overwriteMode = OverwriteMode.AlwaysOverwrite, CopyOptions options = CopyOptions.AllowHardLinkCreation, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task
sourceFilePath string
destinationFilePath string
overwriteMode OverwriteMode
options CopyOptions
cancellationToken System.Threading.CancellationToken
progressCallback long>.Action
Результат Task

DeleteEmptyDirectories() публичный статический Метод

public static DeleteEmptyDirectories ( string root, bool deleteRoot = false ) : void
root string
deleteRoot bool
Результат void

EnumerateDirectories() публичный статический Метод

public static EnumerateDirectories ( string path, string searchPattern = "*.*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable
path string
searchPattern string
searchOption SearchOption
Результат IEnumerable

EnumerateFiles() публичный статический Метод

public static EnumerateFiles ( string path, string searchPattern = "*.*", SearchOption searchOption = SearchOption.TopDirectoryOnly ) : IEnumerable
path string
searchPattern string
searchOption SearchOption
Результат IEnumerable

Move() публичный статический Метод

public static Move ( string sourceFilePath, string destinationFilePath, OverwriteMode overwriteMode = OverwriteMode.AlwaysOverwrite, CancellationToken cancellationToken = null, long>.Action progressCallback = null ) : Task
sourceFilePath string
destinationFilePath string
overwriteMode OverwriteMode
cancellationToken System.Threading.CancellationToken
progressCallback long>.Action
Результат Task