public override bool Exists(string path) { path = fixFileName(path); if (VirtualFileSystem.Instance.exists(path)) { return(true); } else { foreach (RocketFileSystemExtension extension in extensions) { if (extension.canOpenFile(path)) { return(true); } } } //Try to load a common resource, if this fails false will be returned. return(CommonResources.Exists(path)); }
public override Stream Open(string path) { path = fixFileName(path); //Check the virtual file system if (VirtualFileSystem.Instance.exists(path)) { return(VirtualFileSystem.Instance.openStream(path, Engine.Resources.FileMode.Open, Engine.Resources.FileAccess.Read)); } //Check the extensions else { foreach (RocketFileSystemExtension extension in extensions) { if (extension.canOpenFile(path)) { return(extension.openFile(path)); } } } //Try to load a common resource, if this fails null will be returned. return(CommonResources.Open(path)); }
protected override bool exists(string filename) { return(!String.IsNullOrEmpty(filename) && CommonResources.Exists(filename)); }
protected override Stream doOpen(string filename) { return(CommonResources.Open(filename)); }