2 namespace Robo\Task\Filesystem;
10 * @return \Robo\Result
12 protected function _copyDir($src, $dst)
14 return $this->taskCopyDir([$src => $dst])->run();
21 * @return \Robo\Result
23 protected function _mirrorDir($src, $dst)
25 return $this->taskMirrorDir([$src => $dst])->run();
29 * @param string|string[] $dir
31 * @return \Robo\Result
33 protected function _deleteDir($dir)
35 return $this->taskDeleteDir($dir)->run();
39 * @param string|string[] $dir
41 * @return \Robo\Result
43 protected function _cleanDir($dir)
45 return $this->taskCleanDir($dir)->run();
51 * @param bool $overwrite
53 * @return \Robo\Result
55 protected function _rename($from, $to, $overwrite = false)
57 return $this->taskFilesystemStack()->rename($from, $to, $overwrite)->run();
61 * @param string|string[] $dir
63 * @return \Robo\Result
65 protected function _mkdir($dir)
67 return $this->taskFilesystemStack()->mkdir($dir)->run();
71 * @param string $prefix
73 * @param bool $includeRandomPart
77 protected function _tmpDir($prefix = 'tmp', $base = '', $includeRandomPart = true)
79 $result = $this->taskTmpDir($prefix, $base, $includeRandomPart)->run();
80 return isset($result['path']) ? $result['path'] : '';
86 * @return \Robo\Result
88 protected function _touch($file)
90 return $this->taskFilesystemStack()->touch($file)->run();
94 * @param string|string[] $file
96 * @return \Robo\Result
98 protected function _remove($file)
100 return $this->taskFilesystemStack()->remove($file)->run();
104 * @param string|string[] $file
105 * @param string $group
107 * @return \Robo\Result
109 protected function _chgrp($file, $group)
111 return $this->taskFilesystemStack()->chgrp($file, $group)->run();
115 * @param string|string[] $file
116 * @param int $permissions
118 * @param bool $recursive
120 * @return \Robo\Result
122 protected function _chmod($file, $permissions, $umask = 0000, $recursive = false)
124 return $this->taskFilesystemStack()->chmod($file, $permissions, $umask, $recursive)->run();
128 * @param string $from
131 * @return \Robo\Result
133 protected function _symlink($from, $to)
135 return $this->taskFilesystemStack()->symlink($from, $to)->run();
139 * @param string $from
142 * @return \Robo\Result
144 protected function _copy($from, $to)
146 return $this->taskFilesystemStack()->copy($from, $to)->run();
150 * @param string $from
153 * @return \Robo\Result
155 protected function _flattenDir($from, $to)
157 return $this->taskFlattenDir([$from => $to])->run();