本文整理汇总了C#中CmisSync.Lib.RepoInfo.addIgnorePath方法的典型用法代码示例。如果您正苦于以下问题:C# RepoInfo.addIgnorePath方法的具体用法?C# RepoInfo.addIgnorePath怎么用?C# RepoInfo.addIgnorePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmisSync.Lib.RepoInfo
的用法示例。
在下文中一共展示了RepoInfo.addIgnorePath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRepoInfo
/// <summary>
/// Get all the configured info about a synchronized folder.
/// </summary>
public RepoInfo GetRepoInfo(string folderName)
{
RepoInfo repoInfo = new RepoInfo(folderName, ConfigPath);
repoInfo.User = GetFolderAttribute(folderName, "user");
repoInfo.Password = GetFolderAttribute(folderName, "password");
repoInfo.Address = GetUrlForFolder(folderName);
repoInfo.RepoID = GetFolderAttribute(folderName, "repository");
repoInfo.RemotePath = GetFolderAttribute(folderName, "remoteFolder");
repoInfo.TargetDirectory = GetFolderAttribute(folderName, "path");
double pollinterval = 0;
double.TryParse(GetFolderAttribute(folderName, "pollinterval"), out pollinterval);
if (pollinterval < 1) pollinterval = 5000;
repoInfo.PollInterval = pollinterval;
if (String.IsNullOrEmpty(repoInfo.TargetDirectory))
{
repoInfo.TargetDirectory = Path.Combine(FoldersPath, folderName);
}
LinkedList<string> ignoredFolders = getIgnoredFolders(folderName);
foreach (string ignoredFolder in ignoredFolders)
{
repoInfo.addIgnorePath(ignoredFolder);
}
return repoInfo;
}
示例2: CreateRepository
/// <summary>
/// Create a new CmisSync synchronized folder.
/// </summary>
public void CreateRepository(string name, Uri address, string user, string password, string repository, string remote_path, string local_path,
List<string> ignoredPaths, bool syncAtStartup)
{
repoInfo = new RepoInfo(name, ConfigManager.CurrentConfig.ConfigPath);
repoInfo.Address = address;
repoInfo.User = user;
repoInfo.Password = new Password(password);
repoInfo.RepoID = repository;
repoInfo.RemotePath = remote_path;
repoInfo.TargetDirectory = local_path;
repoInfo.PollInterval = Config.DEFAULT_POLL_INTERVAL;
repoInfo.IsSuspended = false;
repoInfo.LastSuccessedSync = new DateTime(1900, 01, 01);
repoInfo.SyncAtStartup = syncAtStartup;
repoInfo.MaxUploadRetries = 2;
foreach (string ignore in ignoredPaths)
repoInfo.addIgnorePath(ignore);
// Check that the CmisSync root folder exists.
if (!Directory.Exists(ConfigManager.CurrentConfig.FoldersPath))
{
Logger.Fatal(String.Format("Fetcher | ERROR - Cmis Default Folder {0} does not exist", ConfigManager.CurrentConfig.FoldersPath));
throw new DirectoryNotFoundException("Root folder don't exist !");
}
// Check that the folder is writable.
if (!CmisSync.Lib.Utils.HasWritePermissionOnDir(ConfigManager.CurrentConfig.FoldersPath))
{
Logger.Fatal(String.Format("Fetcher | ERROR - Cmis Default Folder {0} is not writable", ConfigManager.CurrentConfig.FoldersPath));
throw new UnauthorizedAccessException("Root folder is not writable!");
}
// Check that the folder exists.
if (Directory.Exists(repoInfo.TargetDirectory))
{
Logger.Fatal(String.Format("Fetcher | ERROR - Cmis Repository Folder {0} already exist", repoInfo.TargetDirectory));
throw new UnauthorizedAccessException("Repository folder already exists!");
}
// Create the local folder.
Directory.CreateDirectory(repoInfo.TargetDirectory);
// Add folder to XML config file.
ConfigManager.CurrentConfig.AddFolder(repoInfo);
// Initialize in the GUI.
AddRepository(repoInfo);
FolderListChanged();
}
示例3: GetRepoInfo
/// <summary>
/// Get all the configured info about a synchronized folder.
/// </summary>
public RepoInfo GetRepoInfo()
{
// TODO: workaround
var localPath = LocalPath.TrimEnd(Path.DirectorySeparatorChar);
RepoInfo repoInfo = new RepoInfo(DisplayName, ConfigManager.CurrentConfig.ConfigPath);
repoInfo.User = UserName;
repoInfo.Password = new Password();
repoInfo.Password.ObfuscatedPassword = ObfuscatedPassword;
repoInfo.Address = RemoteUrl;
repoInfo.RepoID = RepositoryId;
repoInfo.RemotePath = RemotePath;
repoInfo.TargetDirectory = localPath;
repoInfo.MaxUploadRetries = uploadRetries;
repoInfo.MaxDownloadRetries = downloadRetries;
repoInfo.MaxDeletionRetries = deletionRetries;
if (PollInterval < 1) PollInterval = Config.DEFAULT_POLL_INTERVAL;
repoInfo.PollInterval = PollInterval;
repoInfo.IsSuspended = IsSuspended;
repoInfo.SyncAtStartup = SyncAtStartup;
foreach (IgnoredFolder ignoredFolder in IgnoredFolders)
{
repoInfo.addIgnorePath(ignoredFolder.Path);
}
if(SupportedFeatures != null && SupportedFeatures.ChunkedSupport != null && SupportedFeatures.ChunkedSupport == true)
{
repoInfo.ChunkSize = ChunkSize;
repoInfo.DownloadChunkSize = ChunkSize;
}
else
{
repoInfo.ChunkSize = 0;
repoInfo.DownloadChunkSize = 0;
}
if(SupportedFeatures != null && SupportedFeatures.ChunkedDownloadSupport!=null && SupportedFeatures.ChunkedDownloadSupport == true)
repoInfo.DownloadChunkSize = ChunkSize;
return repoInfo;
}
示例4: GetRepoInfo
/// <summary>
/// Get all the configured info about a synchronized folder.
/// </summary>
public RepoInfo GetRepoInfo()
{
RepoInfo repoInfo = new RepoInfo(DisplayName, ConfigManager.CurrentConfig.ConfigPath);
repoInfo.User = UserName;
repoInfo.Password = new CmisSync.Auth.CmisPassword();
repoInfo.Password.ObfuscatedPassword = ObfuscatedPassword;
repoInfo.Address = RemoteUrl;
repoInfo.RepoID = RepositoryId;
repoInfo.RemotePath = RemotePath;
repoInfo.TargetDirectory = LocalPath;
if (PollInterval < 1) PollInterval = Config.DEFAULT_POLL_INTERVAL;
repoInfo.PollInterval = PollInterval;
foreach (IgnoredFolder ignoredFolder in IgnoredFolders)
{
repoInfo.addIgnorePath(ignoredFolder.Path);
}
return repoInfo;
}
示例5: StartFetcher
/// <summary>
/// Create a new CmisSync synchronized folder.
/// </summary>
public void StartFetcher(string name, Uri address, string user, string password, string repository, string remote_path, string local_path,
List<string> ignoredPaths)
{
repoInfo = new RepoInfo(name, ConfigManager.CurrentConfig.ConfigPath);
repoInfo.Address = address;
repoInfo.User = user;
repoInfo.Password = password;
repoInfo.RepoID = repository;
repoInfo.RemotePath = remote_path;
repoInfo.TargetDirectory = local_path;
repoInfo.PollInterval = Config.DEFAULT_POLL_INTERVAL;
foreach (string ignore in ignoredPaths)
repoInfo.addIgnorePath(ignore);
fetcher = new Fetcher(repoInfo, activityListenerAggregator);
this.FinishFetcher();
}