int DokanOperations.Unmount(DokanFileInfo info) { if (this.closer != null) { this.closer.Dispose(); this.closer = null; } try{ session.Disconnect(); }catch {} this.cache.Dispose(); return(0); }
public SftpFsOperation(ISshSession session, ISftpAccount account) { this.session = session; this.stat_cache = new SftpStatCache(this); //this.cache=new RemoteEasyCache(this,session.Message); this.cache = new RemoteDiskCache(this, session.Message); this.closer = new FileAutoCloser(cache); this.account = account; // resolve_path string path_remote = account.ServerRoot; if (path_remote == null) { path_remote = ""; } if (path_remote[path_remote.Length - 1] == '/') { path_remote = path_remote.Substring(0, path_remote.Length - 1); } this.path_remote = path_remote; }