|
def | execute (self, gsutil_args) |
|
def | upload (self, local_path, remote_path, recursive=False, multithread=False) |
|
def | cat (self, remote_path) |
|
def | setGroupReadACL (self, remote_path, group) |
|
def | setContentType (self, remote_path, content_type) |
|
def | remove (self, remote_path, recursive=False) |
|
Definition at line 56 of file bot_utils.py.
◆ cat()
def bots.bot_utils.GSUtil.cat |
( |
|
self, |
|
|
|
remote_path |
|
) |
| |
Definition at line 102 of file bot_utils.py.
102 def cat(self, remote_path):
103 assert remote_path.startswith('gs://')
104
105 args = ['cat', remote_path]
106 (stdout, _, _) = self.execute(args)
107 return stdout
108
◆ execute()
def bots.bot_utils.GSUtil.execute |
( |
|
self, |
|
|
|
gsutil_args |
|
) |
| |
Definition at line 79 of file bot_utils.py.
80 self._layzCalculateGSUtilPath()
81
82 gsutil_command = [sys.executable, GSUtil.GSUTIL_PATH]
83
84 return run(gsutil_command + gsutil_args)
85
◆ remove()
def bots.bot_utils.GSUtil.remove |
( |
|
self, |
|
|
|
remote_path, |
|
|
|
recursive = False |
|
) |
| |
Definition at line 117 of file bot_utils.py.
117 def remove(self, remote_path, recursive=False):
118 assert remote_path.startswith('gs://')
119
120 args = ['rm']
121 if recursive:
122 args += ['-R']
123 args += [remote_path]
124 self.execute(args)
◆ setContentType()
def bots.bot_utils.GSUtil.setContentType |
( |
|
self, |
|
|
|
remote_path, |
|
|
|
content_type |
|
) |
| |
Definition at line 113 of file bot_utils.py.
113 def setContentType(self, remote_path, content_type):
114 args = ['setmeta', '-h', 'Content-Type:%s' % content_type, remote_path]
115 self.execute(args)
116
◆ setGroupReadACL()
def bots.bot_utils.GSUtil.setGroupReadACL |
( |
|
self, |
|
|
|
remote_path, |
|
|
|
group |
|
) |
| |
Definition at line 109 of file bot_utils.py.
109 def setGroupReadACL(self, remote_path, group):
110 args = ['acl', 'ch', '-g', '%s:R' % group, remote_path]
111 self.execute(args)
112
◆ upload()
def bots.bot_utils.GSUtil.upload |
( |
|
self, |
|
|
|
local_path, |
|
|
|
remote_path, |
|
|
|
recursive = False , |
|
|
|
multithread = False |
|
) |
| |
Definition at line 86 of file bot_utils.py.
90 multithread=False):
91 assert remote_path.startswith('gs://')
92
93 if multithread:
94 args = ['-m', 'cp']
95 else:
96 args = ['cp']
97 if recursive:
98 args += ['-R']
99 args += [local_path, remote_path]
100 self.execute(args)
101
◆ GSUTIL_PATH
bots.bot_utils.GSUtil.GSUTIL_PATH = None |
|
static |
◆ USE_DART_REPO_VERSION
bool bots.bot_utils.GSUtil.USE_DART_REPO_VERSION = False |
|
static |
The documentation for this class was generated from the following file: