Skip to main content

IVirtualFile

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface IVirtualFile : IVirtualNode

Properties

VirtualPathProvider

View Source
Declaration
IVirtualPathProvider VirtualPathProvider { get; }

Extension

The file extension without '.' prefix

View Source
Declaration
string Extension { get; }

Length

View Source
Declaration
long Length { get; }

Methods

GetFileHash()

View Source
Declaration
string GetFileHash()
Returns

System.String

OpenRead()

View Source
Declaration
Stream OpenRead()
Returns

System.IO.Stream

OpenText()

View Source
Declaration
StreamReader OpenText()
Returns

System.IO.StreamReader

ReadAllText()

View Source
Declaration
string ReadAllText()
Returns

System.String

GetContents()

Returns ReadOnlyMemory<byte> for binary files or ReadOnlyMemory<char> for text files

View Source
Declaration
object GetContents()
Returns

System.Object

Refresh()

Refresh file stats for this node if supported

View Source
Declaration
void Refresh()

WritePartialToAsync(Stream, Int64, Int64, CancellationToken)

View Source
Declaration
Task WritePartialToAsync(Stream toStream, long start, long end, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.IO.StreamtoStream
System.Int64start
System.Int64end
System.Threading.CancellationTokentoken