Class VfsSubtreeSource¶
Namespace: Apogee.Content.FileSystem
Assembly: Apogee.Content.dll
A folder of the virtual file system as a source of its own: res://packages/cool seen as the root of a package, so that it can be mounted at mod://cool beside the
packages that are zips. Read-only, whatever the folder is made of (a real folder, a pack, a zip).
public sealed class VfsSubtreeSource : IFileSource
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
VfsSubtreeSource(VirtualFileSystem, string)¶
A folder of the virtual file system as a source of its own: res://packages/cool seen as the root of a package, so that it can be mounted at mod://cool beside the
packages that are zips. Read-only, whatever the folder is made of (a real folder, a pack, a zip).
public VfsSubtreeSource(VirtualFileSystem files, string root)
Parameters¶
files VirtualFileSystem
root string
Properties¶
Description¶
What the source is, for messages: a folder's path, a zip's file name.
public string Description { get; }
Property Value¶
Root¶
The folder of the virtual file system this source is a view of.
public string Root { get; }
Property Value¶
Methods¶
Kind(string)¶
public FileKind Kind(string path)
Parameters¶
path string
Returns¶
List(string, List<(string Name, FileKind Kind)>)¶
Adds the entries directly inside directory to into: their names and kinds, in any order (a source may list
public void List(string directory, List<(string Name, FileKind Kind)> into)
Parameters¶
directory string
into List<(string Name, FileKind Kind)>
OpenRead(string)¶
public Stream OpenRead(string path)
Parameters¶
path string
Returns¶
Exceptions¶
There is no such file.
PhysicalPath(string)¶
The path in the real file system, when there is one: for watching a file or handing it to a library that wants a path.
public string? PhysicalPath(string path)
Parameters¶
path string
Returns¶
ReadAllBytes(string)¶
public byte[] ReadAllBytes(string path)
Parameters¶
path string
Returns¶
byte[]
Exceptions¶
There is no such file.