Class FileSystemUtils
Inheritance
FileSystemUtils
Assembly: DotNetNuke.dll
Syntax
public class FileSystemUtils
Constructors
FileSystemUtils()
Declaration
Methods
AddToZip(ref ZipOutputStream, string, string, string)
Declaration
[Obsolete("Deprecated in DotNetNuke 9.11.0. Replaced with .NET compression types. Scheduled for removal in v11.0.0.")]
public static void AddToZip(ref ZipOutputStream zipFile, string filePath, string fileName, string folder)
Parameters
Type |
Name |
Description |
ZipOutputStream |
zipFile |
|
string |
filePath |
|
string |
fileName |
|
string |
folder |
|
AddToZip(ref ZipArchive, string, string, string)
Declaration
public static void AddToZip(ref ZipArchive zipFile, string filePath, string fileName, string folder)
Parameters
AddToZipAsync(ZipArchive, string, string, string, CancellationToken)
Declaration
public static Task AddToZipAsync(ZipArchive zipFile, string filePath, string fileName, string folder, CancellationToken cancellationToken = default)
Parameters
Returns
CopyFile(string, string)
Declaration
public static void CopyFile(string sourceFileName, string destFileName)
Parameters
Type |
Name |
Description |
string |
sourceFileName |
|
string |
destFileName |
|
CopyFileAsync(string, string)
Declaration
public static Task CopyFileAsync(string sourceFileName, string destFileName)
Parameters
Type |
Name |
Description |
string |
sourceFileName |
|
string |
destFileName |
|
Returns
DeleteEmptyFoldersRecursive(string)
Declaration
public static void DeleteEmptyFoldersRecursive(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
DeleteEmptyFoldersRecursiveAsync(string, CancellationToken)
Declaration
public static Task DeleteEmptyFoldersRecursiveAsync(string path, CancellationToken cancellationToken = default)
Parameters
Returns
DeleteFile(string)
Declaration
public static void DeleteFile(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
DeleteFileAsync(string)
Declaration
public static Task DeleteFileAsync(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
Returns
DeleteFileWithWait(string, short, short)
Declaration
public static bool DeleteFileWithWait(string fileName, short waitInMilliseconds, short maxAttempts)
Parameters
Type |
Name |
Description |
string |
fileName |
|
short |
waitInMilliseconds |
|
short |
maxAttempts |
|
Returns
DeleteFileWithWaitAsync(string, short, short, CancellationToken)
Declaration
public static Task<bool> DeleteFileWithWaitAsync(string fileName, short waitInMilliseconds, short maxAttempts, CancellationToken cancellationToken = default)
Parameters
Returns
DeleteFiles(IApplicationStatusInfo, Array)
Declaration
public static string DeleteFiles(IApplicationStatusInfo appStatus, Array arrPaths)
Parameters
Returns
DeleteFiles(Array)
Declaration
[Obsolete("Deprecated in DotNetNuke 10.0.2. Please use overload with IApplicationStatusInfo. Scheduled removal in v12.0.0.")]
public static string DeleteFiles(Array arrPaths)
Parameters
Type |
Name |
Description |
Array |
arrPaths |
|
Returns
DeleteFilesAsync(IApplicationStatusInfo, Array, CancellationToken)
Declaration
public static Task<string> DeleteFilesAsync(IApplicationStatusInfo appStatus, Array arrPaths, CancellationToken cancellationToken = default)
Parameters
Returns
DeleteFilesRecursive(string, string)
Declaration
public static void DeleteFilesRecursive(string strRoot, string filter)
Parameters
DeleteFilesRecursiveAsync(string, string, CancellationToken)
Declaration
public static Task DeleteFilesRecursiveAsync(string strRoot, string filter, CancellationToken cancellationToken = default)
Parameters
Returns
DeleteFolderRecursive(string)
Declaration
public static void DeleteFolderRecursive(string strRoot)
Parameters
Type |
Name |
Description |
string |
strRoot |
|
DeleteFolderRecursiveAsync(string, CancellationToken)
Declaration
public static Task DeleteFolderRecursiveAsync(string strRoot, CancellationToken cancellationToken = default)
Parameters
Returns
FixPath(string)
Declaration
public static string FixPath(string input)
Parameters
Type |
Name |
Description |
string |
input |
|
Returns
ReadFile(string)
Declaration
public static string ReadFile(string filePath)
Parameters
Type |
Name |
Description |
string |
filePath |
|
Returns
ReadFileAsync(string, CancellationToken)
Declaration
public static Task<string> ReadFileAsync(string filePath, CancellationToken cancellationToken = default)
Parameters
Returns
Declaration
[Obsolete("Deprecated in DotNetNuke 9.11.0. Replaced with .NET compression types. Scheduled for removal in v11.0.0.")]
public static void UnzipResources(ZipInputStream zipStream, string destPath)
Parameters
Type |
Name |
Description |
ZipInputStream |
zipStream |
|
string |
destPath |
|
UnzipResources(IEnumerable<ZipArchiveEntry>, string)
Declaration
public static void UnzipResources(IEnumerable<ZipArchiveEntry> zipArchiveEntries, string destPath)
Parameters
UnzipResources(ZipArchive, string)
Declaration
public static void UnzipResources(ZipArchive zipStream, string destPath)
Parameters
UnzipResourcesAsync(IEnumerable<ZipArchiveEntry>, string, CancellationToken)
Declaration
public static Task UnzipResourcesAsync(IEnumerable<ZipArchiveEntry> zipArchiveEntries, string destPath, CancellationToken cancellationToken)
Parameters
Returns
UnzipResourcesAsync(ZipArchive, string, CancellationToken)
Declaration
public static Task UnzipResourcesAsync(ZipArchive zipStream, string destPath, CancellationToken cancellationToken = default)
Parameters
Returns
Extension Methods