1using System.Threading.Tasks;
11 internal class SynchronizeFolder :
ICommand
13 private readonly FolderNode node;
19 public SynchronizeFolder(FolderNode Node)
22 this.SynchronizationOptions = Node.SynchronizationOptions;
23 this.FileFilter = Node.FileFilter;
29 [Page(2,
"File System", 100)]
30 [Header(7,
"Synchronization Mode:")]
31 [ToolTip(8,
"If, and how, files in the folder (or subfolders) will be synchronized.")]
35 [Text(
TextPosition.AfterField, 16,
"You can add default script templates to be used for files found, by adding string-valued meta-data tags to the node, where the meta-data key names correspond to file extensions.")]
41 [Page(2,
"File System", 100)]
42 [Header(5,
"File Filter:")]
43 [ToolTip(6,
"You can limit the files to be monitored using a file filter. If no filter is provided, all files within the scope will be monitored.")]
44 public string FileFilter {
get;
set; }
49 public string CommandID => nameof(SynchronizeFolder);
59 public string SortCategory =>
"FileSystem";
64 public string SortKey =>
"Synchronize";
73 return this.node.CanEditAsync(Caller);
82 return new SynchronizeFolder(this.node);
88 public Task ExecuteCommandAsync()
90 return Task.CompletedTask;
108 return Task.FromResult(
string.Empty);
117 return Task.FromResult(
string.Empty);
136 SynchronizationStatistics Statistics =
new SynchronizationStatistics(this.node,
Query);
137 return this.node.SynchFolder(this.SynchronizationOptions, this.FileFilter, Statistics);
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Class handling the reception of data from a query.
Tokens available in request.
TextPosition
Where the instructions are to be place.
SynchronizationOptions
How a folder will synchronize nodes with contents of folders.