public void Unmount() { davFs.RepositoryActionPerformed -= (s, e) => { RepositoryActionPerformed?.Invoke(s, e); }; davFs.RepositoryAuthenticationFailed -= (s, e) => { RepositoryAuthenticationFailed?.Invoke(s, e); }; Host.Unmount(); Host = null; }
public void Mount(Configuration config) { davFs = new DavFS(config); davFs.RepositoryActionPerformed += (s, e) => { RepositoryActionPerformed?.Invoke(s, e); }; davFs.RepositoryAuthenticationFailed += (s, e) => { RepositoryAuthenticationFailed?.Invoke(s, e); }; Host = new FileSystemHost(davFs); if (Host.Mount($"{config.DriveLetter}:", null, config.SyncOps, 0) < 0) { throw new IOException("cannot mount file system"); } }