Added chmod perm, modal to change, api with local/ftp/sftp (#399)

Read a fill current permissions for local driver

Finished permissions for ftp driver, read and change

Read permissions for sftp adapter

Created FilegatorFtp for a cleaner permissions integration

Implemented recursive chmod options for files/folders

Modified tests to cover permissions

Lint frontend permissions component
This commit is contained in:
Andrei Telteu
2024-04-17 18:23:21 +03:00
committed by GitHub
parent 42e50b93da
commit 27310f9d48
15 changed files with 431 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ class DirectoryCollection implements \JsonSerializable
$this->location = $location;
}
public function addFile(string $type, string $path, string $name, int $size, int $timestamp)
public function addFile(string $type, string $path, string $name, int $size, int $timestamp, int $permissions)
{
if (! in_array($type, ['dir', 'file', 'back'])) {
throw new \Exception('Invalid file type.');
@@ -35,6 +35,7 @@ class DirectoryCollection implements \JsonSerializable
'name' => $name,
'size' => $size,
'time' => $timestamp,
'permissions' => $permissions,
]);
}