@@ -31,10 +31,10 @@ class Filesystem
31
31
* If the target file is newer, it is overwritten only when the
32
32
* $overwriteNewerFiles option is set to true.
33
33
*
34
+ * @return void
35
+ *
34
36
* @throws FileNotFoundException When originFile doesn't exist
35
37
* @throws IOException When copy fails
36
- *
37
- * @return void
38
38
*/
39
39
public function copy (string $ originFile , string $ targetFile , bool $ overwriteNewerFiles = false )
40
40
{
@@ -84,9 +84,9 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe
84
84
/**
85
85
* Creates a directory recursively.
86
86
*
87
- * @throws IOException On any directory creation failure
88
- *
89
87
* @return void
88
+ *
89
+ * @throws IOException On any directory creation failure
90
90
*/
91
91
public function mkdir (string |iterable $ dirs , int $ mode = 0777 )
92
92
{
@@ -127,9 +127,9 @@ public function exists(string|iterable $files): bool
127
127
* @param int|null $time The touch time as a Unix timestamp, if not supplied the current system time is used
128
128
* @param int|null $atime The access time as a Unix timestamp, if not supplied the current system time is used
129
129
*
130
- * @throws IOException When touch fails
131
- *
132
130
* @return void
131
+ *
132
+ * @throws IOException When touch fails
133
133
*/
134
134
public function touch (string |iterable $ files , int $ time = null , int $ atime = null )
135
135
{
@@ -143,9 +143,9 @@ public function touch(string|iterable $files, int $time = null, int $atime = nul
143
143
/**
144
144
* Removes files or directories.
145
145
*
146
- * @throws IOException When removal fails
147
- *
148
146
* @return void
147
+ *
148
+ * @throws IOException When removal fails
149
149
*/
150
150
public function remove (string |iterable $ files )
151
151
{
@@ -211,9 +211,9 @@ private static function doRemove(array $files, bool $isRecursive): void
211
211
* @param int $umask The mode mask (octal)
212
212
* @param bool $recursive Whether change the mod recursively or not
213
213
*
214
- * @throws IOException When the change fails
215
- *
216
214
* @return void
215
+ *
216
+ * @throws IOException When the change fails
217
217
*/
218
218
public function chmod (string |iterable $ files , int $ mode , int $ umask = 0000 , bool $ recursive = false )
219
219
{
@@ -233,9 +233,9 @@ public function chmod(string|iterable $files, int $mode, int $umask = 0000, bool
233
233
* @param string|int $user A user name or number
234
234
* @param bool $recursive Whether change the owner recursively or not
235
235
*
236
- * @throws IOException When the change fails
237
- *
238
236
* @return void
237
+ *
238
+ * @throws IOException When the change fails
239
239
*/
240
240
public function chown (string |iterable $ files , string |int $ user , bool $ recursive = false )
241
241
{
@@ -261,9 +261,9 @@ public function chown(string|iterable $files, string|int $user, bool $recursive
261
261
* @param string|int $group A group name or number
262
262
* @param bool $recursive Whether change the group recursively or not
263
263
*
264
- * @throws IOException When the change fails
265
- *
266
264
* @return void
265
+ *
266
+ * @throws IOException When the change fails
267
267
*/
268
268
public function chgrp (string |iterable $ files , string |int $ group , bool $ recursive = false )
269
269
{
@@ -286,10 +286,10 @@ public function chgrp(string|iterable $files, string|int $group, bool $recursive
286
286
/**
287
287
* Renames a file or a directory.
288
288
*
289
+ * @return void
290
+ *
289
291
* @throws IOException When target file or directory already exists
290
292
* @throws IOException When origin cannot be renamed
291
- *
292
- * @return void
293
293
*/
294
294
public function rename (string $ origin , string $ target , bool $ overwrite = false )
295
295
{
@@ -329,9 +329,9 @@ private function isReadable(string $filename): bool
329
329
/**
330
330
* Creates a symbolic link or copy a directory.
331
331
*
332
- * @throws IOException When symlink fails
333
- *
334
332
* @return void
333
+ *
334
+ * @throws IOException When symlink fails
335
335
*/
336
336
public function symlink (string $ originDir , string $ targetDir , bool $ copyOnWindows = false )
337
337
{
@@ -367,10 +367,10 @@ public function symlink(string $originDir, string $targetDir, bool $copyOnWindow
367
367
*
368
368
* @param string|string[] $targetFiles The target file(s)
369
369
*
370
+ * @return void
371
+ *
370
372
* @throws FileNotFoundException When original file is missing or not a file
371
373
* @throws IOException When link fails, including if link already exists
372
- *
373
- * @return void
374
374
*/
375
375
public function hardlink (string $ originFile , string |iterable $ targetFiles )
376
376
{
@@ -526,9 +526,9 @@ public function makePathRelative(string $endPath, string $startPath): string
526
526
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
527
527
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
528
528
*
529
- * @throws IOException When file type is unknown
530
- *
531
529
* @return void
530
+ *
531
+ * @throws IOException When file type is unknown
532
532
*/
533
533
public function mirror (string $ originDir , string $ targetDir , \Traversable $ iterator = null , array $ options = [])
534
534
{
@@ -652,9 +652,9 @@ public function tempnam(string $dir, string $prefix, string $suffix = ''): strin
652
652
*
653
653
* @param string|resource $content The data to write into the file
654
654
*
655
- * @throws IOException if the file cannot be written to
656
- *
657
655
* @return void
656
+ *
657
+ * @throws IOException if the file cannot be written to
658
658
*/
659
659
public function dumpFile (string $ filename , $ content )
660
660
{
@@ -693,9 +693,9 @@ public function dumpFile(string $filename, $content)
693
693
* @param string|resource $content The content to append
694
694
* @param bool $lock Whether the file should be locked when writing to it
695
695
*
696
- * @throws IOException If the file is not writable
697
- *
698
696
* @return void
697
+ *
698
+ * @throws IOException If the file is not writable
699
699
*/
700
700
public function appendToFile (string $ filename , $ content/* , bool $lock = false */ )
701
701
{
0 commit comments