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
Type | Name |
---|---|
ServiceStack.IO.IVirtualDirectory | dir |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualDirectory | dir |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualDirectory | dir |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
ServiceStack.IO.IVirtualFile | file |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
System.String | textContents |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
ReadOnlyMemory<System.Char> | textContents |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
System.Byte[] | binaryContents |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
ReadOnlyMemory<System.Byte> | romBytes |
System.Threading.CancellationToken | token |
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
Type | Name |
---|---|
ServiceStack.IO.IVirtualFiles | vfs |
System.String | filePath |
System.IO.Stream | stream |
System.Threading.CancellationToken | token |