You are here

public function S3fsFileService::prepareDirectory in S3 File System 8.3

Same name and namespace in other branches
  1. 4.0.x src/S3fsFileService.php \Drupal\s3fs\S3fsFileService::prepareDirectory()

Checks that the directory exists and is writable.

Directories need to have execute permissions to be considered a directory by FTP servers, etc.

Parameters

string $directory: A string reference containing the name of a directory path or URI. A trailing slash will be trimmed from a path.

int $options: A bitmask to indicate if the directory should be created if it does not exist (FileSystemInterface::CREATE_DIRECTORY) or made writable if it is read-only (FileSystemInterface::MODIFY_PERMISSIONS).

Return value

bool TRUE if the directory exists (or was created) and is writable. FALSE otherwise.

Overrides FileSystemInterface::prepareDirectory

1 call to S3fsFileService::prepareDirectory()
S3fsFileService::prepareDestination in src/S3fsFileService.php
Prepares the destination for a file copy or move operation.

File

src/S3fsFileService.php, line 414

Class

S3fsFileService
Provides helpers to operate on files and stream wrappers.

Namespace

Drupal\s3fs

Code

public function prepareDirectory(&$directory, $options = self::MODIFY_PERMISSIONS) {
  return $this->decorated
    ->prepareDirectory($directory, $options);
}