示例#1
0
 def copy(self, *paths, **options):
     """Copy **src** file or directory to **dst**. *paths and **options
     contains options that can be passed to the command. **options can
     contain an additionnal key *INTERACTIVE* that will be pass to
     ``execute`` function."""
     paths = [escape(path) for path in paths]
     return self.execute('cp', *paths, **options)
示例#2
0
 def copy(self, *paths, **options):
     """Copy **src** file or directory to **dst**. *paths and **options
     contains options that can be passed to the command. **options can
     contain an additionnal key *INTERACTIVE* that will be pass to
     ``execute`` function."""
     paths = [escape(path) for path in paths]
     return self.execute('cp', *paths, **options)
示例#3
0
 def chmod(self, permissions, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chmod', permissions, *paths, **options)
示例#4
0
 def remove(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('rm', *paths, **options)
示例#5
0
 def mkdir(self, *paths, **options):
     """Create a directory. *args and **options contains options that can be
     passed to the command. **options can contain an additionnal key
     *INTERACTIVE* that will be pass to ``execute`` function."""
     paths = [escape(path) for path in paths]
     return self.execute('mkdir', *paths, **options)
示例#6
0
 def touch(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('touch', *paths, **options)
示例#7
0
 def touch(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('touch', *paths, **options)
示例#8
0
 def mount(self, device, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('mount', device, mount_point, **options)
示例#9
0
 def mount(self, device, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('mount', device, mount_point, **options)
示例#10
0
 def chgrp(self, group, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chgrp', group, *path, **options)
示例#11
0
 def chown(self, owner, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chown', owner, *paths, **options)
示例#12
0
 def chmod(self, permissions, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chmod', permissions, *paths, **options)
示例#13
0
 def remove(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('rm', *paths, **options)
示例#14
0
 def mkdir(self, *paths, **options):
     """Create a directory. *args and **options contains options that can be
     passed to the command. **options can contain an additionnal key
     *INTERACTIVE* that will be pass to ``execute`` function."""
     paths = [escape(path) for path in paths]
     return self.execute('mkdir', *paths, **options)
示例#15
0
 def chown(self, owner, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chown', owner, *paths, **options)
示例#16
0
 def umount(self, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('umount', mount_point, **options)
示例#17
0
 def chgrp(self, group, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chgrp', group, *path, **options)
示例#18
0
 def list(self, path, **opts):
     status, stdout, stderr = self.execute('ls', escape(path), **opts)
     if not status:
         raise OSError(stderr)
     return stdout
示例#19
0
 def umount(self, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('umount', mount_point, **options)
示例#20
0
 def list(self, path, **opts):
     status, stdout, stderr = self.execute('ls', escape(path), **opts)
     if not status:
         raise OSError(stderr)
     return stdout