PackageTrack
Sign in Get early access

amphp/file

Non-blocking access to the filesystem based on Amp and Revolt.

v4.0.0 3.5M downloads/mo #3381 most downloaded on Packagist amphp/file

What this package is like to depend on

Last release 3 months ago

09 May 2026

Release timing varies

gaps range from 1 weeks to 1.3 years

Rarely documented

notes for 7 of 30 stable releases

Nothing withdrawn

no release was ever pulled

11 years old

37 releases · first in 2015

1 release in the last 12 months

see the full history below

Release timeline

37 releases · Sep 2015 to May 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 37
  1. v4.0.0 09 May 2026
    Release notes

    Users of 3.x should be able to update to 4.x without code changes unless their application did one of the following:

    • Defined a custom File implementation
    • Initialized ParallelFilesystemDriver with a custom worker count.

    Breaking Changes

    This release adds a lock(), tryLock(), and unlock() to the File interface. These methods provide a non-blocking means of locking and unlocking a file.

    • File::lock(): Non-blocking method to obtain a shared or exclusive lock on the file. This method must only return once the lock has been obtained.
    • File::tryLock(): Makes a single non-blocking attempt to obtain a shared or exclusive lock on the file. Returns true if the lock was obtained, otherwise false.
    • File::unlock(): Unlocks the file if the lock is currently held.

    In 3.x, the constructor of ParallelFilesystemDriver accepted an optional WorkerPool and a number of workers to use from that pool. In 4.x, instead the constructor now requires only an optional LimitedWorkerPool (a new pool is created if one is not provided). The number of workers used for opening files is determined by the value returned from LimitedWorkerPool::getWorkerLimit(). Use a DelegateWorkerPool if you wish to use an existing pool and limit the number of workers used from the pool to open files. In general, it is not necessary to customize the parallel filesystem driver.


    Full Changelog: v3.2.0...v4.0.0-beta.1

    Open source →
    Release notes

    Users of 3.x should be able to update to 4.x without code changes unless their application did one of the following:

    • Defined a custom File implementation
    • Initialized ParallelFilesystemDriver with a custom worker count.

    Breaking Changes

    This release adds a lock(), tryLock(), and unlock() to the File interface. These methods provide a non-blocking means of locking and unlocking a file.

    • File::lock(): Non-blocking method to obtain a shared or exclusive lock on the file. This method must only return once the lock has been obtained.
    • File::tryLock(): Makes a single non-blocking attempt to obtain a shared or exclusive lock on the file. Returns true if the lock was obtained, otherwise false.
    • File::unlock(): Unlocks the file if the lock is currently held.

    In 3.x, the constructor of ParallelFilesystemDriver accepted an optional WorkerPool and a number of workers to use from that pool. In 4.x, instead the constructor now requires only an optional LimitedWorkerPool (a new pool is created if one is not provided). The number of workers used for opening files is determined by the value returned from LimitedWorkerPool::getWorkerLimit(). Use a DelegateWorkerPool if you wish to use an existing pool and limit the number of workers used from the pool to open files. In general, it is not necessary to customize the parallel filesystem driver.


    Full Changelog: v3.2.0...v4.0.0

    Open source →
    Release notes

    4.0.0 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. v4.0.0-beta.1 10 Jan 2025 pre-release

    Nothing published for this version

  3. v3.2.0 06 Dec 2024
    Release notes

    What's Changed

    • The parallel driver no longer reuses the global worker pool if a specific instance is not provided to the constructor. Instead, a new worker pool is created.
    • The $workerLimit parameter to the constructor of ParallelFilesystemDriver is now deprecated. Pass an instance of LimitedWorkerPool instead.

    Full Changelog: v3.1.1...v3.2.0

    Open source →
    Release notes

    3.2.0

    Compare

    Choose a tag to compare

    Open source →
  4. v3.1.1 15 Aug 2024
    Release notes

    What's Changed

    • Dropped support for ext-uv < 0.3.0.
    • Changed the version check for ext-uv to avoid an ext-opcache bug (see amphp/http-client#365).

    Full Changelog: v3.1.0...v3.1.1

    Open source →
    Release notes

    3.1.1

    Compare

    Choose a tag to compare

    Open source →
  5. v3.1.0 21 Apr 2024
    Release notes

    What's Changed

    • Add FileCache class by @Nadyita in #83
    • Add KeyedFileMutex by @bwoebi in #62
    • Made implicit nullable types explicit to avoid deprecation notice in PHP 8.4

    New Contributors

    Full Changelog: v3.0.2...v3.1.0

    Open source →
    Release notes

    3.1.0

    Compare

    Choose a tag to compare

    Open source →
  6. v3.0.2 27 Dec 2023
    Release notes

    What's Changed

    • Fixed detecting if a file is writing from the file mode when r+ (or similar) is used as the mode. (#77)
    • Fixed assertion failing during shutdown destruction of ParallelFilesystemDriver. (#81)

    Full Changelog: v3.0.1...v3.0.2

    Open source →
    Release notes

    3.0.2

    Compare

    Choose a tag to compare

    Open source →
  7. v3.0.1 23 Jul 2023
    Release notes

    What's Changed

    • Fix touch() on non-existent files in ext-uv and ext-eio by @kelunik (#73)
    • Fix write() truncation with ext-uv and ext-eio by @danog in (#76)

    Full Changelog: v3.0.0...v3.0.1

    Open source →
    Release notes

    3.0.1

    Compare

    Choose a tag to compare

    Open source →
  8. v3.0.0 02 Mar 2023
    Release notes

    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.

    • Renamed BlockingDriver to BlockingFilesystemDriver
    • Renamed EioDriver to EioFilesystemDriver
    • Renamed ParallelDriver to ParallelFilesystemDriver
    • Renamed StatusCachingDriver to StatusCachingFilesystemDriver
    • Renamed UvDriver to UvFilesystemDriver
    • Renamed Amp\File\Sync\AsyncFileMutex to Amp\File\FileMutex
    • Added ?Cancellation as first parameter of File::read()
    • Added File::isSeekable()
    • Removed File::SEEK_SET, File::SEEK_CUR, and File::SEEK_END
    • Added Amp\File\Whence for seeking instead
    Open source →
    Release notes
    • Fixed compatibility with v2.0 of amphp/byte-stream by updating File implementations to also implement Traversable.
    Open source →
    Release notes
    • Fixed PendingOperationError being thrown after several seek-then-write operations in UvFile and EioFile.
    Open source →
    Release notes

    3.0.0

    Compare

    Choose a tag to compare

    Open source →
  9. v3.0.0-beta.6 08 Jan 2023 pre-release

    Nothing published for this version

  10. v3.0.0-beta.5 18 Nov 2022 pre-release

    Nothing published for this version

  11. v3.0.0-beta.4 07 Nov 2022 pre-release

    Nothing published for this version

  12. v3.0.0-beta.3 08 Sep 2022 pre-release

    Nothing published for this version

  13. v3.0.0-beta.2 28 Mar 2022 pre-release

    Nothing published for this version

  14. v3.0.0-beta.1 09 Feb 2022 pre-release

    Nothing published for this version

  15. v2.0.4 08 Sep 2022

    Nothing published for this version

  16. v2.0.3 08 Feb 2022

    Nothing published for this version

  17. v2.0.2 20 Sep 2021

    Nothing published for this version

  18. v2.0.1 12 Jul 2021

    Nothing published for this version

  19. v2.0.0 21 Jun 2021

    Nothing published for this version

  20. v1.0.2 14 Jul 2020

    Nothing published for this version

  21. v1.0.1 10 Jul 2020

    Nothing published for this version

  22. v1.0.0 14 Sep 2019

    Nothing published for this version

  23. v0.3.5 01 Mar 2019

    Nothing published for this version

  24. v0.3.4 01 Mar 2019

    Nothing published for this version

  25. v0.3.3 28 Oct 2018

    Nothing published for this version

  26. v0.3.2 27 Oct 2018

    Nothing published for this version

  27. v0.3.1 17 Mar 2018

    Nothing published for this version

  28. v0.3.0 15 Dec 2017

    Nothing published for this version

  29. v0.2.4 21 Jul 2017

    Nothing published for this version

  30. v0.2.3 18 Jul 2017

    Nothing published for this version

  31. v0.2.2 06 Jul 2017

    Nothing published for this version

  32. v0.2.1 23 Jun 2017

    Nothing published for this version

  33. v0.2.0 22 Jun 2017

    Nothing published for this version

  34. v0.1.3 01 Oct 2016

    Nothing published for this version

  35. v0.1.2 24 Mar 2016

    Nothing published for this version

  36. v0.1.1 08 Feb 2016

    Nothing published for this version

  37. v0.1.0 10 Sep 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive