An abstraction layer and non-blocking file access solution that keeps your application responsive.
FileCache
class by @Nadyita in https://github.com/amphp/file/pull/83
KeyedFileMutex
by @bwoebi in https://github.com/amphp/file/pull/62
Full Changelog: https://github.com/amphp/file/compare/v3.0.2...v3.1.0
r+
(or similar) is used as the mode. (#77)ParallelFilesystemDriver
. (#81)Full Changelog: https://github.com/amphp/file/compare/v3.0.1...v3.0.2
touch()
on non-existent files in ext-uv and ext-eio by @kelunik (#73)write()
truncation with ext-uv and ext-eio by @danog in (#76)Full Changelog: https://github.com/amphp/file/compare/v3.0.0...v3.0.1
Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType>
have been replaced with ResolutionType
.
BlockingDriver
to BlockingFilesystemDriver
EioDriver
to EioFilesystemDriver
ParallelDriver
to ParallelFilesystemDriver
StatusCachingDriver
to StatusCachingFilesystemDriver
UvDriver
to UvFilesystemDriver
Amp\File\Sync\AsyncFileMutex
to Amp\File\FileMutex
?Cancellation
as first parameter of File::read()
File::isSeekable()
File::SEEK_SET
, File::SEEK_CUR
, and File::SEEK_END
Amp\File\Whence
for seeking insteadv2.0
of amphp/byte-stream
by updating File
implementations to also implement Traversable
.PendingOperationError
being thrown after several seek-then-write operations in UvFile
and EioFile
.ext-eio
ext-uv
BlockingFilesystemDriver::write
createDirectoryRecursively
with trailing slash with ext-uv
/ ext-eio
(https://github.com/amphp/file/issues/70, https://github.com/amphp/file/pull/71)createDirectoryRecursively
with trailing slash in async drivers (https://github.com/amphp/file/issues/70, https://github.com/amphp/file/pull/71)Closable
interface adding an onClose
. All File
objects now include an onClose
method which can be used to attache a closure which will be invoked when the file is closed.