Class FileSystemHelper
- Namespace
- CodeBase
- Assembly
- 4Experience.CodeBase.Core.Runtime.dll
Simple IO helper, that contains aliases for System.IO functions.
public static class FileSystemHelper
- Inheritance
-
FileSystemHelper
Methods
CanSaveFile(string)
public static bool CanSaveFile(string filePath)
Parameters
filePathstring
Returns
CombineIntoPath(string, string)
Combines two variables of type string into a path using the System.IO.Path.Combine.
public static string CombineIntoPath(string partOne, string partTwo)
Parameters
Returns
CombineIntoPathManually(string, string, string)
Combines two variables of type string into a path using custom separator.
public static string CombineIntoPathManually(string partOne, string partTwo, string separator = "/")
Parameters
Returns
CreateDirectory(string)
public static void CreateDirectory(string newDirectoryPath)
Parameters
newDirectoryPathstring
DeleteDirectory(DirectoryInfo)
public static void DeleteDirectory(DirectoryInfo directory)
Parameters
directoryDirectoryInfo
DeleteFile(FileInfo)
public static void DeleteFile(FileInfo file)
Parameters
fileFileInfo
IsDirectoryExists(string)
public static bool IsDirectoryExists(string directoryPath)
Parameters
directoryPathstring
Returns
IsFileExists(string)
public static bool IsFileExists(string filePath)
Parameters
filePathstring
Returns
SaveFile(string, byte[])
Save byte array as binary file at provided path if directory exist.
public static void SaveFile(string filePath, byte[] bytesToSave)