Skip to content

Commit 1bcb7ab

Browse files
authored
Merge pull request #38 from devleatherks/master
Removing from file storage
2 parents 84e467e + 2964253 commit 1bcb7ab

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Storage/FileStorage.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,19 @@ public function get($key)
5252

5353
return null;
5454
}
55+
56+
/**
57+
* @param $key string
58+
*
59+
* @return void
60+
*/
61+
public function delete($key)
62+
{
63+
$filePath = $this->storageFolder . $key;
64+
if (file_exists($filePath)) {
65+
return unlink($filePath);
66+
}
67+
68+
return false;
69+
}
5570
}

0 commit comments

Comments
 (0)