@@ -41,6 +41,9 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | + /** |
|
| 45 | + * @param string $path |
|
| 46 | + */ |
|
| 44 | 47 | private function getFileSizeWindows($path) |
| 45 | 48 | { |
| 46 | 49 | $escapedPath = escapeshellarg($path); |
@@ -52,6 +55,9 @@ discard block |
||
| 52 | 55 | } |
| 53 | 56 | } |
| 54 | 57 | |
| 58 | + /** |
|
| 59 | + * @param string $path |
|
| 60 | + */ |
|
| 55 | 61 | private function getFileSizeLinux($path) |
| 56 | 62 | { |
| 57 | 63 | $escapedPath = escapeshellarg($path); |
@@ -63,6 +69,9 @@ discard block |
||
| 63 | 69 | } |
| 64 | 70 | } |
| 65 | 71 | |
| 72 | + /** |
|
| 73 | + * @param string $path |
|
| 74 | + */ |
|
| 66 | 75 | private function getFileSizeMac($path) |
| 67 | 76 | { |
| 68 | 77 | $escapedPath = escapeshellarg($path); |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | /** |
| 77 | 77 | * Moves file to new location / rename |
| 78 | 78 | * @param string $destination path |
| 79 | - * @return bool |
|
| 79 | + * @return boolean|null |
|
| 80 | 80 | * @throws Exception |
| 81 | 81 | */ |
| 82 | 82 | function move($destination) |
@@ -22,8 +22,9 @@ |
||
| 22 | 22 | { |
| 23 | 23 | // Use the Windows COM interface |
| 24 | 24 | $fsobj = new \COM('Scripting.FileSystemObject'); |
| 25 | - if (dirname($path) == '.') |
|
| 26 | - $this->path = ((substr(getcwd(), -1) == DIRECTORY_SEPARATOR) ? getcwd() . basename($path) : getcwd() . DIRECTORY_SEPARATOR . basename($path)); |
|
| 25 | + if (dirname($path) == '.') { |
|
| 26 | + $this->path = ((substr(getcwd(), -1) == DIRECTORY_SEPARATOR) ? getcwd() . basename($path) : getcwd() . DIRECTORY_SEPARATOR . basename($path)); |
|
| 27 | + } |
|
| 27 | 28 | $f = $fsobj->GetFile($path); |
| 28 | 29 | return BigInteger::of($f->Size); |
| 29 | 30 | } |