コード例 #1
0
        public override void DeleteDirectory(Directory directory)
        {
            if (!directory.Parent.Equals(this))
            {
                throw new ArgumentException("The specified directory could not be found");
            }

            GoogleDriveDirectory googleDriveDirectory = directory as GoogleDriveDirectory;

            if (storage.UseTrash)
            {
                FilesResource.TrashRequest request = storage.Service.Files.Trash(googleDriveDirectory.folder.Id);
                request.Execute();
            }
            else
            {
                FilesResource.DeleteRequest request = storage.Service.Files.Delete(googleDriveDirectory.folder.Id);
                request.Execute();
            }
        }
コード例 #2
0
 public GoogleDriveDirectory(GoogleDriveStorage storage, GoogleDriveDirectory parent, Google.Apis.Drive.v2.Data.File folder)
 {
     this.storage = storage;
     this.parent  = parent;
     this.folder  = folder;
 }
コード例 #3
0
 public GoogleDriveFile(GoogleDriveStorage storage, GoogleDriveDirectory parent, Google.Apis.Drive.v2.Data.File file)
 {
     this.storage = storage;
     this.parent  = parent;
     this.file    = file;
 }