Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
 def chmod(self, permissions, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chmod', permissions, *paths, **options)
Exemplo n.º 4
0
 def remove(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('rm', *paths, **options)
Exemplo n.º 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)
Exemplo n.º 6
0
 def touch(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('touch', *paths, **options)
Exemplo n.º 7
0
 def touch(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('touch', *paths, **options)
Exemplo n.º 8
0
 def mount(self, device, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('mount', device, mount_point, **options)
Exemplo n.º 9
0
 def mount(self, device, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('mount', device, mount_point, **options)
Exemplo n.º 10
0
 def chgrp(self, group, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chgrp', group, *path, **options)
Exemplo n.º 11
0
 def chown(self, owner, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chown', owner, *paths, **options)
Exemplo n.º 12
0
 def chmod(self, permissions, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chmod', permissions, *paths, **options)
Exemplo n.º 13
0
 def remove(self, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('rm', *paths, **options)
Exemplo n.º 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)
Exemplo n.º 15
0
 def chown(self, owner, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chown', owner, *paths, **options)
Exemplo n.º 16
0
 def umount(self, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('umount', mount_point, **options)
Exemplo n.º 17
0
 def chgrp(self, group, *paths, **options):
     paths = [escape(path) for path in paths]
     return self.execute('chgrp', group, *path, **options)
Exemplo n.º 18
0
 def list(self, path, **opts):
     status, stdout, stderr = self.execute('ls', escape(path), **opts)
     if not status:
         raise OSError(stderr)
     return stdout
Exemplo n.º 19
0
 def umount(self, mount_point, **options):
     mount_point = escape(mount_point)
     return self.execute('umount', mount_point, **options)
Exemplo n.º 20
0
 def list(self, path, **opts):
     status, stdout, stderr = self.execute('ls', escape(path), **opts)
     if not status:
         raise OSError(stderr)
     return stdout