Skip to main content

VirtualDirectoryExtensions

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class VirtualDirectoryExtensions

Methods

GetFiles(IVirtualDirectory)

Get only files in this directory

View Source
Declaration
public static IEnumerable<IVirtualFile> GetFiles(this IVirtualDirectory dir)
Returns

System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>

Parameters
TypeName
ServiceStack.IO.IVirtualDirectorydir

GetDirectories(IVirtualDirectory)

Get only sub directories in this directory

View Source
Declaration
public static IEnumerable<IVirtualDirectory> GetDirectories(this IVirtualDirectory dir)
Returns

System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>

Parameters
TypeName
ServiceStack.IO.IVirtualDirectorydir

GetAllFiles(IVirtualDirectory)

Get All Files in current and all sub directories

View Source
Declaration
public static IEnumerable<IVirtualFile> GetAllFiles(this IVirtualDirectory dir)
Returns

System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>

Parameters
TypeName
ServiceStack.IO.IVirtualDirectorydir

WriteFileAsync(IVirtualFiles, String, IVirtualFile, CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, IVirtualFile file, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
ServiceStack.IO.IVirtualFilefile
System.Threading.CancellationTokentoken

WriteFileAsync(IVirtualFiles, String, String, CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, string textContents, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
System.StringtextContents
System.Threading.CancellationTokentoken

WriteFileAsync(IVirtualFiles, String, ReadOnlyMemory<Char>, CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, ReadOnlyMemory<char> textContents, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
ReadOnlyMemory<System.Char>textContents
System.Threading.CancellationTokentoken

WriteFileAsync(IVirtualFiles, String, Byte[], CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, byte[] binaryContents, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
System.Byte[]binaryContents
System.Threading.CancellationTokentoken

WriteFileAsync(IVirtualFiles, String, ReadOnlyMemory<Byte>, CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, ReadOnlyMemory<byte> romBytes, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
ReadOnlyMemory<System.Byte>romBytes
System.Threading.CancellationTokentoken

WriteFileAsync(IVirtualFiles, String, Stream, CancellationToken)

View Source
Declaration
public static async Task WriteFileAsync(this IVirtualFiles vfs, string filePath, Stream stream, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IO.IVirtualFilesvfs
System.StringfilePath
System.IO.Streamstream
System.Threading.CancellationTokentoken