Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 8313759

Browse files
authored
Merge pull request #10 from lezhnev74/directory-bug
Added directory creation before file creation (to avoid dir not found…
2 parents 6f1291e + 5c1c5a9 commit 8313759

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Filesystem.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public function exists($path)
4141
*/
4242
public function createFile($path, $contents = '', $lock = false)
4343
{
44+
$this->createDirectory(dirname($path));
45+
4446
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
4547
}
4648

0 commit comments

Comments
 (0)