Skip to content

GcsFilesystemAdapter

ListableFilesystemInterface over GcsClient (HMAC interop-key REST client, no google/cloud-storage).

The path-to-key mapping, the error translation and the listing live in ListableObjectStoreFilesystemAdapter, shared with the other object-store drivers; this class supplies the client and the provider name that appears in its messages.

final readonly class GcsFilesystemAdapter extends ListableObjectStoreFilesystemAdapter

ExtendsListableObjectStoreFilesystemAdapter
SourceGcsFilesystemAdapter.php

public function __construct(GcsClient $client, string $objectPrefix = ''): mixed

ParameterTypeDescription
$clientGcsClient
$objectPrefixstring

Returns mixed

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
delete()ObjectStoreFilesystemAdapterDeletes the object under $path.
exists()ObjectStoreFilesystemAdapterReports whether the store holds an object under $path.
lastModified()ObjectStoreFilesystemAdapterReturns the object’s modification time, taken from its Last-Modified metadata.
listContents()ListableObjectStoreFilesystemAdapter
read()ObjectStoreFilesystemAdapterReturns the body of the object stored under $path.
size()ObjectStoreFilesystemAdapterReturns the object’s size in bytes, taken from its Content-Length metadata.
write()ObjectStoreFilesystemAdapterStores $contents as the object under $path, replacing any existing object.