Class FileService
Defines a service for file system operations.
Assembly: Coree.NETStandard.dll
Syntax
public class FileService : ServiceFactory<FileService>, IDisposable, IFileService
Constructors
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
FileService(ILogger<FileService>?)
Declaration
public FileService(ILogger<FileService>? logger = null)
Parameters
Methods
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
GetCorrectCasedPath(string?)
Declaration
public string? GetCorrectCasedPath(string? path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
GetCorrectCasedPathAsync(string?, CancellationToken)
Corrects the casing of a specified file or directory path based on the actual casing on the file system.
Declaration
public Task<string?> GetCorrectCasedPathAsync(string? path, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
string |
path |
The path to correct. Can be either a file or directory path.
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<string> |
The path with corrected casing if the file or directory exists. Returns null for null or empty input,
returns the original path if the path does not exist or if the file system is case-sensitive and not NTFS or FAT.
|
Remarks
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
IsCommandAvailable(string?)
Declaration
public string? IsCommandAvailable(string? path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
IsCommandAvailableAsync(string?, CancellationToken)
Declaration
public Task<string?> IsCommandAvailableAsync(string? command, CancellationToken cancellationToken)
Parameters
Returns
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
IsExecutableFilePresent(string?, string)
Declaration
public string? IsExecutableFilePresent(string? command, string path)
Parameters
Returns
|
<<<<<<< HEAD
Edit this page
View Source
=======
Edit this page
View Source
>>>>>>> release
IsExecutableFilePresentAsync(string?, string)
Declaration
public Task<string?> IsExecutableFilePresentAsync(string? command, string path)
Parameters
Returns
Implements