LocalFileSystem

LocalFileSystem class

The LocalFileSystem will maps the read/write operations to local directory.

public class LocalFileSystem : FileSystem

Constructors

NameDescription
LocalFileSystem(string)Initialize a new LocalFileSystem with specified base directory.

Methods

NameDescription
virtual Dispose()Dispose the File system and release its resources.
override ReadFile(string, IOConfig)Create a stream for reading dependencies.
override 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