Esempio n. 1
0
        public void Unmount()
        {
            davFs.RepositoryActionPerformed      -= (s, e) => { RepositoryActionPerformed?.Invoke(s, e); };
            davFs.RepositoryAuthenticationFailed -= (s, e) => { RepositoryAuthenticationFailed?.Invoke(s, e); };

            Host.Unmount();
            Host = null;
        }
Esempio n. 2
0
        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");
            }
        }