Skip to main content

IVirtualFiles

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface IVirtualFiles : IVirtualPathProvider

Methods

WriteFileAsync(String, Object, CancellationToken)

View Source
Declaration
Task WriteFileAsync(string filePath, object contents, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.StringfilePath
System.Objectcontents
System.Threading.CancellationTokentoken

WriteFile(String, String)

View Source
Declaration
void WriteFile(string filePath, string textContents)
Parameters
TypeName
System.StringfilePath
System.StringtextContents

WriteFile(String, Stream)

View Source
Declaration
void WriteFile(string filePath, Stream stream)
Parameters
TypeName
System.StringfilePath
System.IO.Streamstream

WriteFile(String, Object)

Contents can be either: string, ReadOnlyMemory<char>, byte[], `ReadOnlyMemory<byte>, Stream or IVirtualFile

View Source
Declaration
void WriteFile(string filePath, object contents)
Parameters
TypeName
System.StringfilePath
System.Objectcontents

WriteFiles(IEnumerable<IVirtualFile>, Func<IVirtualFile, String>)

View Source
Declaration
void WriteFiles(IEnumerable<IVirtualFile> files, Func<IVirtualFile, string> toPath = null)
Parameters
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>files
System.Func<ServiceStack.IO.IVirtualFile,System.String>toPath

WriteFiles(Dictionary<String, String>)

View Source
Declaration
void WriteFiles(Dictionary<string, string> textFiles)
Parameters
TypeName
System.Collections.Generic.Dictionary<System.String,System.String>textFiles

WriteFiles(Dictionary<String, Object>)

View Source
Declaration
void WriteFiles(Dictionary<string, object> files)
Parameters
TypeName
System.Collections.Generic.Dictionary<System.String,System.Object>files

AppendFile(String, String)

View Source
Declaration
void AppendFile(string filePath, string textContents)
Parameters
TypeName
System.StringfilePath
System.StringtextContents

AppendFile(String, Stream)

View Source
Declaration
void AppendFile(string filePath, Stream stream)
Parameters
TypeName
System.StringfilePath
System.IO.Streamstream

AppendFile(String, Object)

Contents can be either: string, ReadOnlyMemory<char>, byte[], `ReadOnlyMemory<byte>, Stream or IVirtualFile

View Source
Declaration
void AppendFile(string filePath, object contents)
Parameters
TypeName
System.StringfilePath
System.Objectcontents

DeleteFile(String)

View Source
Declaration
void DeleteFile(string filePath)
Parameters
TypeName
System.StringfilePath

DeleteFiles(IEnumerable<String>)

View Source
Declaration
void DeleteFiles(IEnumerable<string> filePaths)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.String>filePaths

DeleteFolder(String)

View Source
Declaration
void DeleteFolder(string dirPath)
Parameters
TypeName
System.StringdirPath