public RPCResult <tysos.Interfaces.IFileSystem> CreateFSHandler(tysos.lib.File src) { // Get the modules associated with the handler tysos.lib.File.Property m_param = src.GetPropertyByName("mods"); if (m_param == null) { throw new Exception("src does not contain 'mods' property"); } List <tysos.lib.File.Property> mods = m_param.Value as List <tysos.lib.File.Property>; if (mods == null) { throw new Exception("mods is of inappropriate type"); } modfs fs = new modfs(mods); // Fork off a separate process to handle this instance of the driver tysos.Process p = tysos.Process.CreateProcess("modfs: " + src.Name, new System.Threading.ThreadStart(fs.MessageLoop), new object[] { fs }); p.Start(); System.Diagnostics.Debugger.Log(0, "modfs", "Created FS handler\n"); return(fs); }
internal modfs_File(modfs device) { d = device; CanRead = true; CanWrite = false; CanSeek = true; CanGrow = false; isatty = false; pos = 0; intProperties = (int)System.IO.FileAttributes.ReadOnly; }