@@ 57-68 (lines=12) @@ | ||
54 | * @throws LockInvalidPathException |
|
55 | * @throws LockPathAlreadyExistsException |
|
56 | */ |
|
57 | public function createDir(string $path): bool |
|
58 | { |
|
59 | try { |
|
60 | return $this->fileSystem->createDir($path); |
|
61 | } catch (InvalidPathException $e) { |
|
62 | throw new LockInvalidPathException('', 0, $e); |
|
63 | } catch (PathAlreadyExistsException $e) { |
|
64 | throw new LockPathAlreadyExistsException('', 0, $e); |
|
65 | } |
|
66 | } |
|
67 | ||
68 | /** |
|
69 | * @throws LockFileNotFoundException |
|
70 | * @throws LockInvalidPathException |
|
71 | */ |
|
@@ 87-98 (lines=12) @@ | ||
84 | * @throws LockPathAlreadyExistsException |
|
85 | * @throws LockInvalidPathException |
|
86 | */ |
|
87 | public function writeFile(string $path, string $content) |
|
88 | { |
|
89 | try { |
|
90 | $this->fileSystem->writeFile($path, $content); |
|
91 | } catch (InvalidPathException $e) { |
|
92 | throw new LockInvalidPathException('', 0, $e); |
|
93 | } catch (PathAlreadyExistsException $e) { |
|
94 | throw new LockPathAlreadyExistsException('', 0, $e); |
|
95 | } |
|
96 | } |
|
97 | } |
|
98 |