예제 #1
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)
예제 #2
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)
 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
 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)
 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)
 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)
 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
 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
 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)
 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
 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