Class FileSystem

FileSystem class

File system encapsulation. Aspose.3D will use this to read/write dependencies.

public abstract class FileSystem : IDisposable

Methods

NameDescription
static CreateDummyFileSystem()Create a dummy file system, read/write operations are dummy operations.
static CreateLocalFileSystem(string)Initialize a new FileSystem that only access local directory. All file read/write on this FileSystem instance will be mapped to specified directory.
static CreateMemoryFileSystem(IDictionary<string, MemoryStream>)
static CreateZipFileSystem(string)File system to provide to the read-only access to speicified zip file or zip stream. File system will be disposed after the open/save operation.
static CreateZipFileSystem(Stream, string)Create a file system to provide to the read-only access to speicified zip file or zip stream. File system will be disposed after the open/save operation.
virtual Dispose()Dispose the File system and release its resources.
abstract ReadFile(string, IOConfig)Create a stream for reading dependencies.
abstract WriteFile(string, IOConfig)Create a stream for writing dependencies.

Examples

The following code shows how to import file, and provide dependent files in a given directory

var inputFile = "input.fbx";
var format = FileFormat.Detect(inputFile);
//create a load options instance and specify a zip file system
var opt = format.CreateLoadOptions();
opt.FileSystem = new LocalFileSystem("textures/");
//load the file
var scene = Scene.FromFile(inputFile, opt);

See Also