Show / Hide Table of Contents

Class FileHelper

Inheritance
object
FileHelper
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.IO
Assembly: Volo.Abp.Core.dll
Syntax
public static class FileHelper

Methods

DeleteIfExists(string)

Declaration
public static bool DeleteIfExists(string filePath)
Parameters
Type Name Description
string filePath
Returns
Type Description
bool

GetExtension(string)

Declaration
public static string? GetExtension(string fileNameWithExtension)
Parameters
Type Name Description
string fileNameWithExtension
Returns
Type Description
string

ReadAllBytesAsync(string)

Declaration
public static Task<byte[]> ReadAllBytesAsync(string path)
Parameters
Type Name Description
string path
Returns
Type Description
Task<byte[]>

ReadAllLinesAsync(string, Encoding?, FileMode, FileAccess, FileShare, int, FileOptions)

Declaration
public static Task<string[]> ReadAllLinesAsync(string path, Encoding? encoding = null, FileMode fileMode = FileMode.Open, FileAccess fileAccess = FileAccess.Read, FileShare fileShare = FileShare.Read, int bufferSize = 4096, FileOptions fileOptions = FileOptions.SequentialScan | FileOptions.Asynchronous)
Parameters
Type Name Description
string path
Encoding encoding
FileMode fileMode
FileAccess fileAccess
FileShare fileShare
int bufferSize
FileOptions fileOptions
Returns
Type Description
Task<string[]>

ReadAllTextAsync(string)

Declaration
public static Task<string> ReadAllTextAsync(string path)
Parameters
Type Name Description
string path
Returns
Type Description
Task<string>

ReadFileWithoutBomAsync(string)

Declaration
public static Task<string> ReadFileWithoutBomAsync(string path)
Parameters
Type Name Description
string path
Returns
Type Description
Task<string>
In this article
Back to top Powered by Volosoft