We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 923dc60 + f7ac021 commit 85c795dCopy full SHA for 85c795d
src/FileAccess.php
@@ -18,10 +18,10 @@ public function getData(string $name):mixed {
18
}
19
20
public function setData(string $name, mixed $value):void {
21
- if(!is_dir($this->dirPath)) {
22
- mkdir($this->dirPath, 0775, true);
23
- }
24
$filePath = "$this->dirPath/$name";
+ if(!is_dir(dirname($filePath))) {
+ mkdir(dirname($filePath), 0775, true);
+ }
25
file_put_contents($filePath, serialize($value));
26
27
0 commit comments