Skip to content

Commit f3674b1

Browse files
committed
filesystem 2.0
1 parent 7999fe0 commit f3674b1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Exporters/Exporter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ public function store(string $filePath, array $diskConfig = [])
172172
$this->type(pathinfo($filePath)['extension'] ?? null);
173173
}
174174

175+
if (method_exists($filesystem, 'write')) {
176+
return $filesystem->write($filePath, $this->raw(), $diskConfig);
177+
}
178+
175179
return $filesystem->put($filePath, $this->raw(), $diskConfig);
176180
} catch (\Throwable $e) {
177181
$this->releaseResources();

src/Importers/TempFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait TempFile
1717
* @return string
1818
* @throws FileNotFoundException
1919
*/
20-
public function moveFileToTemp(FilesystemInterface $filesystem, string $filePath)
20+
public function moveFileToTemp($filesystem, string $filePath)
2121
{
2222
$this->tempFile = $this->generateTempPath($filePath);
2323

0 commit comments

Comments
 (0)