5 using SiliconStudio.Core.IO;
6 using SiliconStudio.Core.MicroThreading;
8 namespace SiliconStudio.BuildEngine
12 public MicroThreadLocal<IVirtualFileProvider> ThreadLocal =
new MicroThreadLocal<IVirtualFileProvider>(() =>
14 throw new InvalidOperationException(
"No VirtualFileProvider set for this microthread.");
23 return ThreadLocal.Value.GetAbsolutePath(path);
28 return ThreadLocal.Value.OpenStream(url, mode, access, share, streamFlags);
33 return ThreadLocal.Value.FileExists(url);
38 return ThreadLocal.Value.FileSize(url);
override Stream OpenStream(string url, VirtualFileMode mode, VirtualFileAccess access, VirtualFileShare share=VirtualFileShare.Read, StreamFlags streamFlags=StreamFlags.None)
Opens a Stream from the specified path. The path.The mode.The access.The process sharing mode...
Abstract base class for IVirtualFileProvider.
VirtualFileShare
File share capabilities, equivalent of System.IO.FileShare.
override long FileSize(string url)
Returns the size of the specified file in bytes The file or directory for which to obtain sizeA long ...
override string GetAbsolutePath(string path)
Gets the absolute path for the specified local path from this provider. The path local to this instan...
VirtualFileAccess
File access equivalent of System.IO.FileAccess.
VirtualFileMode
File mode equivalent of System.IO.FileMode.
override bool FileExists(string url)
Determines whether the specified path points to an existing file. The path.
StreamFlags
Describes the different type of streams.
MicroThreadFileProvider(string rootPath)