// internal private void init() { MyDirectory = new Dictionary <string, Chunk>(); MySubDirs = new Dictionary <string, List <Chunk> >(); orderedChunks = new List <Chunk>(); MySubDirs.Add(ROOT_PATH, orderedChunks); openChunks = new Dictionary <ulong, OpenChunk>(); Stats = new CFSStats(); KeepStats = false; }
public CFSStats snapshot() { lock (myLock) { CFSStats rv = new CFSStats(); rv.OtherCalls = this.OtherCalls; rv.ReadBytes = this.ReadBytes; rv.ReadCalls = this.ReadCalls; rv.UnsupportedCalls = this.UnsupportedCalls; rv.Starting = DateTime.Now; return(rv); } }
// runs itself. for a GUI program this needs to be invoked on a thread // other than the gui's main one! public bool exec() { Stats = new CFSStats(); DokanOptions opt = new DokanOptions(); opt.MountPoint = Config.MountPoint; opt.DebugMode = Logger.UsuallyDebugging && Logger.getLogger().isConsole(); opt.UseStdErr = Logger.UsuallyDebugging && Logger.getLogger().isConsole(); opt.VolumeLabel = "ChunkFS-" + Config.Name; opt.FileSystemName = "CFS"; int status = DokanNet.DokanMain(opt, this); switch (status) { case DokanNet.DOKAN_DRIVE_LETTER_ERROR: Logger.getLogger().log("Drive letter error"); break; case DokanNet.DOKAN_DRIVER_INSTALL_ERROR: Logger.getLogger().log("Driver install error"); break; case DokanNet.DOKAN_MOUNT_ERROR: Logger.getLogger().log("Mount error"); break; case DokanNet.DOKAN_START_ERROR: Logger.getLogger().log("Start error"); break; case DokanNet.DOKAN_ERROR: Logger.getLogger().log("Unknown error"); break; case DokanNet.DOKAN_SUCCESS: Logger.getLogger().log("Success"); break; default: Logger.getLogger().log("Unknown status: " + status); break; } return(true); }
public CFSStats snapshot() { lock (myLock) { CFSStats rv = new CFSStats(); rv.OtherCalls = this.OtherCalls; rv.ReadBytes = this.ReadBytes; rv.ReadCalls = this.ReadCalls; rv.UnsupportedCalls = this.UnsupportedCalls; rv.Starting = DateTime.Now; return rv; } }
// internal private void init() { MyDirectory = new Dictionary<string, Chunk>(); MySubDirs = new Dictionary<string, List<Chunk>>(); orderedChunks = new List<Chunk>(); MySubDirs.Add(ROOT_PATH, orderedChunks); openChunks = new Dictionary<ulong, OpenChunk>(); Stats = new CFSStats(); KeepStats = false; }
// runs itself. for a GUI program this needs to be invoked on a thread // other than the gui's main one! public bool exec() { Stats = new CFSStats(); DokanOptions opt = new DokanOptions(); opt.MountPoint = Config.MountPoint; opt.DebugMode = Logger.UsuallyDebugging && Logger.getLogger().isConsole(); opt.UseStdErr = Logger.UsuallyDebugging && Logger.getLogger().isConsole(); opt.VolumeLabel = "ChunkFS-"+Config.Name; opt.FileSystemName = "CFS"; int status = DokanNet.DokanMain(opt, this); switch (status) { case DokanNet.DOKAN_DRIVE_LETTER_ERROR: Logger.getLogger().log("Drive letter error"); break; case DokanNet.DOKAN_DRIVER_INSTALL_ERROR: Logger.getLogger().log("Driver install error"); break; case DokanNet.DOKAN_MOUNT_ERROR: Logger.getLogger().log("Mount error"); break; case DokanNet.DOKAN_START_ERROR: Logger.getLogger().log("Start error"); break; case DokanNet.DOKAN_ERROR: Logger.getLogger().log("Unknown error"); break; case DokanNet.DOKAN_SUCCESS: Logger.getLogger().log("Success"); break; default: Logger.getLogger().log("Unknown status: " + status); break; } return true; }