コード例 #1
0
ファイル: commandlineparser.py プロジェクト: shenfe/snakebite
 def setrep(self):
     rep_factor = int(self.args.single_int_arg)
     result = self.client.setrep(self.args.dir,
                                 rep_factor,
                                 recurse=self.args.recurse)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #2
0
ファイル: commandlineparser.py プロジェクト: shenfe/snakebite
 def chmod(self):
     mode = int(str(self.args.single_int_arg), 8)
     mods = self.client.chmod(self.args.dir,
                              mode,
                              recurse=self.args.recurse)
     for line in format_results(mods, json_output=self.args.json):
         print(line)
コード例 #3
0
 def chown(self):
     owner = self.args.single_arg
     try:
         mods = self.client.chown(self.args.dir, owner, recurse=self.args.recurse)
         for line in format_results(mods, json_output=self.args.json):
             print(line)
     except FileNotFoundException:
         exitError(sys.exc_info())
コード例 #4
0
 def chown(self):
     owner = self.args.single_arg
     try:
         mods = self.client.chown(self.args.dir, owner, recurse=self.args.recurse)
         for line in format_results(mods, json_output=self.args.json):
             print line
     except FileNotFoundException, e:
         exitError(e)
コード例 #5
0
ファイル: commandlineparser.py プロジェクト: shenfe/snakebite
 def get(self):
     paths = self.args.dir
     dst = self.args.single_arg
     result = self.client.copyToLocal(paths,
                                      dst,
                                      check_crc=self.args.checkcrc)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #6
0
 def mv(self):
     paths = self.args.dir
     dst = self.args.single_arg
     result = self.client.rename(paths, dst)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #7
0
 def chgrp(self):
     grp = self.args.single_arg
     mods = self.client.chgrp(self.args.dir, grp, recurse=self.args.recurse)
     for line in format_results(mods, json_output=self.args.json):
         print(line)
コード例 #8
0
 def mkdirp(self):
     creations = self.client.mkdir(self.args.dir, create_parent=True)
     for line in format_results(creations, json_output=self.args.json):
         print(line)
コード例 #9
0
 def setrep(self):
     rep_factor = int(self.args.single_int_arg)
     result = self.client.setrep(self.args.dir, rep_factor, recurse=self.args.recurse)
     for line in format_results(result, json_output=self.args.json):
         print line
コード例 #10
0
 def copyFromLocal(self):
     src = self.args.dir
     dst = self.args.single_arg
     result = self.client.copyFromLocal(src, dst)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #11
0
 def mv(self):
     paths = self.args.dir
     dst = self.args.single_arg
     result = self.client.rename(paths, dst)
     for line in format_results(result, json_output=self.args.json):
         print line
コード例 #12
0
 def chgrp(self):
     grp = self.args.single_arg
     mods = self.client.chgrp(self.args.dir, grp, recurse=self.args.recurse)
     for line in format_results(mods, json_output=self.args.json):
         print line
コード例 #13
0
 def chmod(self):
     mode = int(str(self.args.single_int_arg), 8)
     mods = self.client.chmod(self.args.dir, mode, recurse=self.args.recurse)
     for line in format_results(mods, json_output=self.args.json):
         print line
コード例 #14
0
 def mkdirp(self):
     creations = self.client.mkdir(self.args.dir, create_parent=True)
     for line in format_results(creations, json_output=self.args.json):
         print line
コード例 #15
0
 def rm(self):
     result = self.client.delete(self.args.dir, recurse=self.args.recurse)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #16
0
 def rmdir(self):
     result = self.client.rmdir(self.args.dir)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #17
0
 def rm(self):
     result = self.client.delete(self.args.dir, recurse=self.args.recurse)
     for line in format_results(result, json_output=self.args.json):
         print line
コード例 #18
0
 def getmerge(self):
     source = self.args.src_dst[0]
     dst = self.args.src_dst[1]
     result = self.client.getmerge(source, dst, newline=self.args.newline)
     for line in format_results(result, json_output=self.args.json):
         print(line)
コード例 #19
0
 def rmdir(self):
     result = self.client.rmdir(self.args.dir)
     for line in format_results(result, json_output=self.args.json):
         print line