InMemoryVirtualDirectory
Assembly: ServiceStack.Common.dll
View Source
Declaration
public class InMemoryVirtualDirectory : AbstractVirtualDirectoryBase, IVirtualDirectory, IVirtualNode, IEnumerable<IVirtualNode>, IEnumerable
Properties
DirLastModified
View Source
Declaration
public DateTime DirLastModified { get; set; }
LastModified
View Source
Declaration
public override DateTime LastModified { get; }
Files
View Source
Declaration
public override IEnumerable<IVirtualFile> Files { get; }
Directories
View Source
Declaration
public override IEnumerable<IVirtualDirectory> Directories { get; }
DirPath
View Source
Declaration
public string DirPath { get; set; }
VirtualPath
View Source
Declaration
public override string VirtualPath { get; }
Name
View Source
Declaration
public override string Name { get; }
Inherited Properties
Directories
View Source
Declaration
public abstract IEnumerable<IVirtualDirectory> Directories { get; }
Directory
View Source
Declaration
public IVirtualDirectory Directory { get; }
Files
View Source
Declaration
public abstract IEnumerable<IVirtualFile> Files { get; }
IsDirectory
View Source
Declaration
public virtual bool IsDirectory { get; }
IsRoot
View Source
Declaration
public virtual bool IsRoot { get; }
LastModified
View Source
Declaration
public abstract DateTime LastModified { get; }
Name
View Source
Declaration
public abstract string Name { get; }
ParentDirectory
View Source
Declaration
public IVirtualDirectory ParentDirectory { get; set; }
RealPath
View Source
Declaration
public virtual string RealPath { get; }
VirtualPath
View Source
Declaration
public virtual string VirtualPath { get; }
Methods
GetFile(String)
View Source
Declaration
public override IVirtualFile GetFile(string virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.String | virtualPath |
GetEnumerator()
View Source
Declaration
public override IEnumerator<IVirtualNode> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<ServiceStack.IO.IVirtualNode>
GetFileFromBackingDirectoryOrDefault(String)
View Source
Declaration
protected override IVirtualFile GetFileFromBackingDirectoryOrDefault(string fileName)
Returns
Parameters
Type | Name |
---|---|
System.String | fileName |
GetMatchingFilesInDir(String)
View Source
Declaration
protected override IEnumerable<IVirtualFile> GetMatchingFilesInDir(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
EnumerateFiles(String)
View Source
Declaration
public IEnumerable<InMemoryVirtualFile> EnumerateFiles(string pattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.InMemoryVirtualFile>
Parameters
Type | Name |
---|---|
System.String | pattern |
GetDirectoryFromBackingDirectoryOrDefault(String)
View Source
Declaration
protected override IVirtualDirectory GetDirectoryFromBackingDirectoryOrDefault(string directoryName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | directoryName |
AddFile(String, String)
View Source
Declaration
public void AddFile(string filePath, string contents)
Parameters
Type | Name |
---|---|
System.String | filePath |
System.String | contents |
AddFile(String, Stream)
View Source
Declaration
public void AddFile(string filePath, Stream stream)
Parameters
Type | Name |
---|---|
System.String | filePath |
System.IO.Stream | stream |
HasFiles()
View Source
Declaration
public bool HasFiles()
Returns
System.Boolean
GetAllMatchingFiles(String, Int32)
View Source
Declaration
public override IEnumerable<IVirtualFile> GetAllMatchingFiles(string globPattern, int maxDepth = 2147483647)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
System.Int32 | maxDepth |
Inherited Methods
Equals(Object)
View Source
Declaration
public override bool Equals(object obj)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | obj |
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
Type | Name |
---|---|
System.String | globPattern |
System.Int32 | maxDepth |
GetDirectory(Stack<String>)
View Source
Declaration
public virtual IVirtualDirectory GetDirectory(Stack<string> virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.Collections.Generic.Stack<System.String> | virtualPath |
GetDirectory(String)
View Source
Declaration
public virtual IVirtualDirectory GetDirectory(string virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | virtualPath |
GetDirectoryFromBackingDirectoryOrDefault(String)
View Source
Declaration
protected abstract IVirtualDirectory GetDirectoryFromBackingDirectoryOrDefault(string directoryName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | directoryName |
GetEnumerator()
View Source
Declaration
public abstract IEnumerator<IVirtualNode> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<ServiceStack.IO.IVirtualNode>
GetFile(Stack<String>)
View Source
Declaration
public virtual IVirtualFile GetFile(Stack<string> virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.Collections.Generic.Stack<System.String> | virtualPath |
GetFile(String)
View Source
Declaration
public virtual IVirtualFile GetFile(string virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.String | virtualPath |
GetFileFromBackingDirectoryOrDefault(String)
View Source
Declaration
protected abstract IVirtualFile GetFileFromBackingDirectoryOrDefault(string fileName)
Returns
Parameters
Type | Name |
---|---|
System.String | fileName |
GetHashCode()
View Source
Declaration
public override int GetHashCode()
Returns
System.Int32
GetMatchingFilesInDir(String)
View Source
Declaration
protected abstract IEnumerable<IVirtualFile> GetMatchingFilesInDir(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
GetPathToRoot(String, Func<IVirtualDirectory, String>)
View Source
Declaration
protected virtual string GetPathToRoot(string separator, Func<IVirtualDirectory, string> pathSel)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | separator |
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
IEnumerable.GetEnumerator()
View Source
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator
ToString()
View Source
Declaration
public override string ToString()
Returns
System.String
Implements
- ServiceStack.IO.IVirtualDirectory
- ServiceStack.IO.IVirtualNode
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualNode>
System.Collections.IEnumerable