Skip to main content

InMemoryVirtualFile

Assembly: ServiceStack.Common.dll
View Source
Declaration
public class InMemoryVirtualFile : AbstractVirtualFileBase, IVirtualFile, IVirtualNode

Properties

DirPath

View Source
Declaration
public string DirPath { get; }

FilePath

View Source
Declaration
public string FilePath { get; set; }

Name

View Source
Declaration
public override string Name { get; }

VirtualPath

View Source
Declaration
public override string VirtualPath { get; }

FileLastModified

View Source
Declaration
public DateTime FileLastModified { get; set; }

LastModified

View Source
Declaration
public override DateTime LastModified { get; }

Length

View Source
Declaration
public override long Length { get; }

TextContents

View Source
Declaration
public string TextContents { get; set; }

ByteContents

View Source
Declaration
public byte[] ByteContents { get; set; }

Inherited Properties

Directory

View Source
Declaration
public IVirtualDirectory Directory { get; set; }

Extension

View Source
Declaration
public virtual string Extension { get; }

IsDirectory

View Source
Declaration
public virtual bool IsDirectory { get; }

LastModified

View Source
Declaration
public abstract DateTime LastModified { get; }

Length

View Source
Declaration
public abstract long Length { get; }

Name

View Source
Declaration
public abstract string Name { get; }

RealPath

View Source
Declaration
public virtual string RealPath { get; }

ScanSkipPaths

View Source
Declaration
public static List<string> ScanSkipPaths { get; set; }

VirtualPath

View Source
Declaration
public virtual string VirtualPath { get; }

VirtualPathProvider

View Source
Declaration
public IVirtualPathProvider VirtualPathProvider { get; set; }

Methods

SetContents(String, Byte[])

View Source
Declaration
public void SetContents(string text, byte[] bytes)
Parameters
TypeName
System.Stringtext
System.Byte[]bytes

OpenRead()

View Source
Declaration
public override Stream OpenRead()
Returns

System.IO.Stream

GetContents()

View Source
Declaration
public override object GetContents()
Returns

System.Object

Refresh()

View Source
Declaration
public override void Refresh()

Inherited Methods

Equals(Object)

View Source
Declaration
public override bool Equals(object obj)
Returns

System.Boolean

Parameters
TypeName
System.Objectobj

GetContents()

View Source
Declaration
public virtual object GetContents()
Returns

System.Object

GetFileHash()

View Source
Declaration
public virtual string GetFileHash()
Returns

System.String

GetHashCode()

View Source
Declaration
public override int GetHashCode()
Returns

System.Int32

GetPathToRoot(String, Func<IVirtualDirectory, String>)

View Source
Declaration
protected virtual string GetPathToRoot(string separator, Func<IVirtualDirectory, string> pathSel)
Returns

System.String

Parameters
TypeName
System.Stringseparator
System.Func<ServiceStack.IO.IVirtualDirectory,System.String>pathSel

GetRealPathToRoot()

View Source
Declaration
protected virtual string GetRealPathToRoot()
Returns

System.String

GetVirtualPathToRoot()

View Source
Declaration
protected virtual string GetVirtualPathToRoot()
Returns

System.String

OpenRead()

View Source
Declaration
public abstract Stream OpenRead()
Returns

System.IO.Stream

OpenText()

View Source
Declaration
public virtual StreamReader OpenText()
Returns

System.IO.StreamReader

ReadAllBytes()

View Source
Declaration
public virtual byte[] ReadAllBytes()
Returns

System.Byte[]

ReadAllText()

View Source
Declaration
public virtual string ReadAllText()
Returns

System.String

Refresh()

View Source
Declaration
public virtual void Refresh()

ToString()

View Source
Declaration
public override string ToString()
Returns

System.String

WritePartialToAsync(Stream, Int64, Int64, CancellationToken)

View Source
Declaration
public virtual async 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

Implements