This class represents a file change information
예제 #1
0
 public Task DeleteFileAsync(string message, string path, CancellationToken cancellationToken)
 {
     var change = new FileChange
     {
         Action = ChangeAction.Remove,
         Path = path
     };
     return this.workspaces.SaveAsync(message, new[] {change}, cancellationToken);
 }
예제 #2
0
 public Task SaveFileAsync(string message, string path, string content, CancellationToken cancellationToken)
 {
     var change = new FileChange
     {
         Action = ChangeAction.Save,
         Encoding = ContentEncoding.Utf8,
         Path = path,
         Content = content
     };
     return this.workspaces.SaveAsync(message, new[] {change}, cancellationToken);
 }
예제 #3
0
 public Task SaveFileAsync(string message, string path, byte[] content, CancellationToken cancellationToken)
 {
     var change = new FileChange
     {
         Action = ChangeAction.Save,
         Encoding = ContentEncoding.Base64,
         Path = path,
         Content = Convert.ToBase64String(content)
     };
     return this.workspaces.SaveAsync(message, new[] {change}, cancellationToken);
 }
 public Task SaveAsync(string message, FileChange[] changes, CancellationToken cancellationToken)
     => this.client.SaveAsync(this.account, this.workspace, message, changes, cancellationToken);