mirror of
https://github.com/bitinflow/bunny-cli.git
synced 2026-03-13 13:45:54 +00:00
first commit
This commit is contained in:
31
app/Bunny/Filesystem/EdgeFile.php
Normal file
31
app/Bunny/Filesystem/EdgeFile.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Bunny\Filesystem;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use stdClass;
|
||||
|
||||
class EdgeFile implements File
|
||||
{
|
||||
private stdClass $file;
|
||||
|
||||
public function __construct(stdClass $file)
|
||||
{
|
||||
$this->file = $file;
|
||||
}
|
||||
|
||||
public function getFilename($search = '', $replace = ''): string
|
||||
{
|
||||
return Str::replaceFirst($search, $replace, $this->file->Path . $this->file->ObjectName);
|
||||
}
|
||||
|
||||
public function isDirectory(): bool
|
||||
{
|
||||
return $this->file->IsDirectory;
|
||||
}
|
||||
|
||||
public function getChecksum(): string
|
||||
{
|
||||
return $this->file->Checksum;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user