Skip to content

Commit

Permalink
chmod snapshot folders and files
Browse files Browse the repository at this point in the history
  • Loading branch information
Niolak committed Apr 25, 2024
1 parent eb21b81 commit 62528ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ public function put(string $filename, string $contents): void
{
if (! file_exists($this->basePath)) {
mkdir($this->basePath, 0777, true);
chmod($this->basePath, 0777);
}

file_put_contents($this->path($filename), $contents);
chmod($this->path($filename), 0666);
}

public function delete(string $fileName): bool
Expand All @@ -73,9 +75,11 @@ public function copy(string $filePath, string $fileName): void
{
if (! file_exists($this->basePath)) {
mkdir($this->basePath, 0777, true);
chmod($this->basePath, 0777);
}

copy($filePath, $this->path($fileName));
chmod($this->path($filename), 0666);
}

public function fileEquals(string $filePath, string $fileName): bool
Expand Down

0 comments on commit 62528ea

Please sign in to comment.