public function S3fsStream::stream_lock in S3 File System 4.0.x
Same name and namespace in other branches
- 8.3 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::stream_lock()
- 8.2 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::stream_lock()
Advisory file locking.
This method is called in response to flock(), when file_put_contents() (when flags contains LOCK_EX), stream_set_blocking() and when closing the stream (LOCK_UN).
Parameters
int $operation: One of:
- LOCK_SH: To acquire a shared lock (reader).
- LOCK_EX: To acquire an exclusive lock (writer).
- LOCK_UN: To release a lock (shared or exclusive).
- LOCK_NB: If you don't want flock() to block while locking. This operation is not supported on Windows.
Return value
bool Returns TRUE on success or FALSE on failure.
Overrides PhpStreamWrapperInterface::stream_lock
See also
flock()
http://php.net/manual/en/streamwrapper.stream-lock.php
File
- src/
StreamWrapper/ S3fsStream.php, line 709
Class
- S3fsStream
- Defines a Drupal s3 (s3://) stream wrapper class.
Namespace
Drupal\s3fs\StreamWrapperCode
public function stream_lock($operation) {
// phpcs:enable
return FALSE;
}