mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 23:09:35 +01:00
gdrive: add gc command support (#3288)
This commit is contained in:
@@ -275,6 +275,13 @@ class RemoteGDrive(RemoteBASE):
|
||||
item.Upload()
|
||||
return item
|
||||
|
||||
@gdrive_retry
|
||||
def delete_remote_file(self, remote_id):
|
||||
param = {"id": remote_id}
|
||||
# it does not create a file on the remote
|
||||
item = self.drive.CreateFile(param)
|
||||
item.Delete()
|
||||
|
||||
@gdrive_retry
|
||||
def get_remote_item(self, name, parents_ids):
|
||||
if not parents_ids:
|
||||
@@ -387,3 +394,7 @@ class RemoteGDrive(RemoteBASE):
|
||||
except ValueError:
|
||||
# We ignore all the non-cache looking files
|
||||
logger.debug('Ignoring path as "non-cache looking"')
|
||||
|
||||
def remove(self, path_info):
|
||||
remote_id = self.get_remote_id(path_info)
|
||||
self.delete_remote_file(remote_id)
|
||||
|
||||
Reference in New Issue
Block a user