class Folders extends Resource (View source)

The "folders" collection of methods.

Typical usage is:

 $storageService = new Google\Service\Storage(...);
 $folders = $storageService->folders;

Methods

delete(string $bucket, string $folder, array $optParams = [])

Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled. (folders.delete)

get(string $bucket, string $folder, array $optParams = [])

Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled. (folders.get)

insert(string $bucket, Folder $postBody, array $optParams = [])

Creates a new folder. Only applicable to buckets with hierarchical namespace enabled. (folders.insert)

listFolders(string $bucket, array $optParams = [])

Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled. (folders.listFolders)

rename(string $bucket, string $sourceFolder, string $destinationFolder, array $optParams = [])

Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled. (folders.rename)

Details

delete(string $bucket, string $folder, array $optParams = [])

Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled. (folders.delete)

Parameters

string $bucket

Name of the bucket in which the folder resides.

string $folder

Name of a folder.

array $optParams

Optional parameters.

Exceptions

Exception

Folder get(string $bucket, string $folder, array $optParams = [])

Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled. (folders.get)

Parameters

string $bucket

Name of the bucket in which the folder resides.

string $folder

Name of a folder.

array $optParams

Optional parameters.

Return Value

Folder

Exceptions

Exception

Folder insert(string $bucket, Folder $postBody, array $optParams = [])

Creates a new folder. Only applicable to buckets with hierarchical namespace enabled. (folders.insert)

Parameters

string $bucket

Name of the bucket in which the folder resides.

Folder $postBody
array $optParams

Optional parameters.

Return Value

Folder

Exceptions

Exception

Folders listFolders(string $bucket, array $optParams = [])

Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled. (folders.listFolders)

Parameters

string $bucket

Name of the bucket in which to look for folders.

array $optParams

Optional parameters.

Return Value

Folders

Exceptions

Exception

GoogleLongrunningOperation rename(string $bucket, string $sourceFolder, string $destinationFolder, array $optParams = [])

Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled. (folders.rename)

Parameters

string $bucket

Name of the bucket in which the folders are in.

string $sourceFolder

Name of the source folder.

string $destinationFolder

Name of the destination folder.

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception