FileSystem.CreateZipFileSystem

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.

public static FileSystem CreateZipFileSystem(Stream stream, string baseDir = "/")

Remarks

This is a read-only file system, so no write operations are supported.

Examples

The following code shows how to import file, and provide dependent files in a zip archive file.

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 = FileSystem.CreateZipFileSystem("textures.zip");
//load the file
var scene = Scene.FromFile(inputFile, opt);

See Also


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.

public static FileSystem CreateZipFileSystem(string fileName)

Examples

The following code shows how to import file, and provide dependent files in a zip archive file.

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 = FileSystem.CreateZipFileSystem("textures.zip");
//load the file
var scene = Scene.FromFile(inputFile, opt);

See Also