Skip to main content

GistVirtualFiles

Assembly: ServiceStack.Common.dll
View Source
Declaration
public class GistVirtualFiles : AbstractVirtualPathProviderBase, IVirtualFiles, IVirtualPathProvider

Properties

Gateway

View Source
Declaration
public IGistGateway Gateway { get; }

GistId

View Source
Declaration
public string GistId { get; }

LastRefresh

View Source
Declaration
public DateTime LastRefresh { get; }

RefreshAfter

View Source
Declaration
public TimeSpan RefreshAfter { get; set; }

RootDirectory

View Source
Declaration
public override IVirtualDirectory RootDirectory { get; }

VirtualPathSeparator

View Source
Declaration
public override string VirtualPathSeparator { get; }

RealPathSeparator

View Source
Declaration
public override string RealPathSeparator { get; }

Inherited Properties

RealPathSeparator

View Source
Declaration
public abstract string RealPathSeparator { get; }

RootDirectory

View Source
Declaration
public abstract IVirtualDirectory RootDirectory { get; }

VirtualPathSeparator

View Source
Declaration
public abstract string VirtualPathSeparator { get; }

Fields

DirSep

View Source
Declaration
public const char DirSep = '\\'

Base64Modifier

View Source
Declaration
public const string Base64Modifier = "|base64"

Methods

Initialize()

View Source
Declaration
protected override void Initialize()

IsDirSep(Char)

View Source
Declaration
public static bool IsDirSep(char c)
Returns

System.Boolean

Parameters
TypeName
System.Charc

GetGistTextContents(String, Gist, out String)

View Source
Declaration
public static bool GetGistTextContents(string filePath, Gist gist, out string text)
Returns

System.Boolean

Parameters
TypeName
System.StringfilePath
ServiceStack.Gistgist
System.Stringtext

GetGistContents(String, Gist, out String, out MemoryStream)

View Source
Declaration
public static bool GetGistContents(string filePath, Gist gist, out string text, out MemoryStream stream)
Returns

System.Boolean

Parameters
TypeName
System.StringfilePath
ServiceStack.Gistgist
System.Stringtext
System.IO.MemoryStreamstream

GetGist(Boolean)

View Source
Declaration
public Gist GetGist(bool refresh = false)
Returns

ServiceStack.Gist

Parameters
TypeName
System.Booleanrefresh

GetGistAsync(Boolean)

View Source
Declaration
public async Task<Gist> GetGistAsync(bool refresh = false)
Returns

System.Threading.Tasks.Task<ServiceStack.Gist>

Parameters
TypeName
System.Booleanrefresh

LoadAllTruncatedFilesAsync()

View Source
Declaration
public async Task LoadAllTruncatedFilesAsync()
Returns

System.Threading.Tasks.Task

ClearGist()

View Source
Declaration
public void ClearGist()

GetFile(String)

View Source
Declaration
public override IVirtualFile GetFile(string virtualPath)
Returns

ServiceStack.IO.IVirtualFile

Parameters
TypeName
System.StringvirtualPath

GetDirectory(String)

View Source
Declaration
public override IVirtualDirectory GetDirectory(string virtualPath)
Returns

ServiceStack.IO.IVirtualDirectory

Parameters
TypeName
System.StringvirtualPath

DirectoryExists(String)

View Source
Declaration
public override bool DirectoryExists(string virtualPath)
Returns

System.Boolean

Parameters
TypeName
System.StringvirtualPath

FileExists(String)

View Source
Declaration
public override bool FileExists(string virtualPath)
Returns

System.Boolean

Parameters
TypeName
System.StringvirtualPath

WriteFiles(Dictionary<String, String>)

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

WriteFiles(Dictionary<String, Object>)

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

WriteFile(String, String)

View Source
Declaration
public void WriteFile(string virtualPath, string contents)
Parameters
TypeName
System.StringvirtualPath
System.Stringcontents

WriteFile(String, Stream)

View Source
Declaration
public void WriteFile(string virtualPath, Stream stream)
Parameters
TypeName
System.StringvirtualPath
System.IO.Streamstream

ToBase64(Stream)

View Source
Declaration
public static string ToBase64(Stream stream)
Returns

System.String

Parameters
TypeName
System.IO.Streamstream

ToBase64(Byte[])

View Source
Declaration
public static string ToBase64(byte[] bytes)
Returns

System.String

Parameters
TypeName
System.Byte[]bytes

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

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

AppendFile(String, String)

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

AppendFile(String, Stream)

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

ResolveGistFileName(String)

View Source
Declaration
public string ResolveGistFileName(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

DeleteFile(String)

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

DeleteFiles(IEnumerable<String>)

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

DeleteFolder(String)

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

EnumerateFiles(String)

View Source
Declaration
public IEnumerable<GistVirtualFile> EnumerateFiles(string prefix = null)
Returns

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

Parameters
TypeName
System.Stringprefix

GetAllFiles()

View Source
Declaration
public override IEnumerable<IVirtualFile> GetAllFiles()
Returns

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

GetImmediateDirectories(String)

View Source
Declaration
public IEnumerable<GistVirtualDirectory> GetImmediateDirectories(string fromDirPath)
Returns

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

Parameters
TypeName
System.StringfromDirPath

GetImmediateFiles(String)

View Source
Declaration
public IEnumerable<GistVirtualFile> GetImmediateFiles(string fromDirPath)
Returns

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

Parameters
TypeName
System.StringfromDirPath

GetDirPath(String)

View Source
Declaration
public string GetDirPath(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

GetImmediateSubDirPath(String, String)

View Source
Declaration
public string GetImmediateSubDirPath(string fromDirPath, string subDirPath)
Returns

System.String

Parameters
TypeName
System.StringfromDirPath
System.StringsubDirPath

SanitizePath(String)

View Source
Declaration
public override string SanitizePath(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

GetFileName(String)

View Source
Declaration
public static string GetFileName(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

Inherited Methods

AppendFile(String, ReadOnlyMemory<Byte>)

View Source
Declaration
public virtual void AppendFile(string path, ReadOnlyMemory<byte> bytes)
Parameters
TypeName
System.Stringpath
ReadOnlyMemory<System.Byte>bytes

AppendFile(String, ReadOnlyMemory<Char>)

View Source
Declaration
public virtual void AppendFile(string path, ReadOnlyMemory<char> text)
Parameters
TypeName
System.Stringpath
ReadOnlyMemory<System.Char>text

AppendFile(String, Object)

View Source
Declaration
public virtual void AppendFile(string path, object contents)
Parameters
TypeName
System.Stringpath
System.Objectcontents

AssertVirtualFiles()

View Source
Declaration
protected IVirtualFiles AssertVirtualFiles()
Returns

ServiceStack.IO.IVirtualFiles

CombineVirtualPath(String, String)

View Source
Declaration
public virtual string CombineVirtualPath(string basePath, string relativePath)
Returns

System.String

Parameters
TypeName
System.StringbasePath
System.StringrelativePath

CreateContentNotSupportedException(Object)

View Source
Declaration
protected NotSupportedException CreateContentNotSupportedException(object value)
Returns

System.NotSupportedException

Parameters
TypeName
System.Objectvalue

DirectoryExists(String)

View Source
Declaration
public virtual bool DirectoryExists(string virtualPath)
Returns

System.Boolean

Parameters
TypeName
System.StringvirtualPath

FileExists(String)

View Source
Declaration
public virtual bool FileExists(string virtualPath)
Returns

System.Boolean

Parameters
TypeName
System.StringvirtualPath

GetAllFiles()

View Source
Declaration
public virtual IEnumerable<IVirtualFile> GetAllFiles()
Returns

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

GetAllMatchingFiles(String, Int32)

View Source
Declaration
public virtual IEnumerable<IVirtualFile> GetAllMatchingFiles(string globPattern, int maxDepth = 2147483647)
Returns

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

Parameters
TypeName
System.StringglobPattern
System.Int32maxDepth

GetDirectory(String)

View Source
Declaration
public virtual IVirtualDirectory GetDirectory(string virtualPath)
Returns

ServiceStack.IO.IVirtualDirectory

Parameters
TypeName
System.StringvirtualPath

GetFile(String)

View Source
Declaration
public virtual IVirtualFile GetFile(string virtualPath)
Returns

ServiceStack.IO.IVirtualFile

Parameters
TypeName
System.StringvirtualPath

GetFileHash(IVirtualFile)

View Source
Declaration
public virtual string GetFileHash(IVirtualFile virtualFile)
Returns

System.String

Parameters
TypeName
ServiceStack.IO.IVirtualFilevirtualFile

GetFileHash(String)

View Source
Declaration
public virtual string GetFileHash(string virtualPath)
Returns

System.String

Parameters
TypeName
System.StringvirtualPath

GetRootDirectories()

View Source
Declaration
public virtual IEnumerable<IVirtualDirectory> GetRootDirectories()
Returns

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

GetRootFiles()

View Source
Declaration
public virtual IEnumerable<IVirtualFile> GetRootFiles()
Returns

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

Initialize()

View Source
Declaration
protected abstract void Initialize()

IsSharedFile(IVirtualFile)

View Source
Declaration
public virtual bool IsSharedFile(IVirtualFile virtualFile)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.IO.IVirtualFilevirtualFile

IsViewFile(IVirtualFile)

View Source
Declaration
public virtual bool IsViewFile(IVirtualFile virtualFile)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.IO.IVirtualFilevirtualFile

SanitizePath(String)

View Source
Declaration
public virtual string SanitizePath(string filePath)
Returns

System.String

Parameters
TypeName
System.StringfilePath

ToString()

View Source
Declaration
public override string ToString()
Returns

System.String

WriteFile(String, ReadOnlyMemory<Byte>)

View Source
Declaration
public virtual void WriteFile(string path, ReadOnlyMemory<byte> bytes)
Parameters
TypeName
System.Stringpath
ReadOnlyMemory<System.Byte>bytes

WriteFile(String, ReadOnlyMemory<Char>)

View Source
Declaration
public virtual void WriteFile(string path, ReadOnlyMemory<char> text)
Parameters
TypeName
System.Stringpath
ReadOnlyMemory<System.Char>text

WriteFile(String, Object)

View Source
Declaration
public virtual void WriteFile(string path, object contents)
Parameters
TypeName
System.Stringpath
System.Objectcontents

WriteFileAsync(String, Object, CancellationToken)

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

System.Threading.Tasks.Task

Parameters
TypeName
System.Stringpath
System.Objectcontents
System.Threading.CancellationTokentoken

WriteFiles(Dictionary<String, Object>)

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

WriteFiles(Dictionary<String, String>)

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

Implements