innmind / io
High level abstraction for streams and sockets
Installs: 53 103
Dependents: 8
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/innmind/io
Requires
- php: ~8.2
 - innmind/immutable: ~5.13
 - innmind/ip: ~3.2
 - innmind/time-continuum: ^4.0.2
 - innmind/url: ~4.3
 - innmind/validation: ~2.0
 
Requires (Dev)
- innmind/black-box: ~6.1
 - innmind/coding-standard: ~2.0
 - innmind/static-analysis: ^1.2.1
 
README
High level abstraction to work with files and sockets in a declarative way.
Installation
composer require innmind/io
Usage
use Innmind\IO\IO; use Innmind\Url\Path; use Innmind\Immutable\Str; $chunks = IO::fromAmbienAuthority() ->files() ->read(Path::of('/some/file.ext')) ->toEncoding(Str\Encoding::ascii) ->chunks(8192); // max length of each chunk
The $chunks variable is a Innmind\Innmutable\Sequence containing Innmind\Immutable\Str values, where each value is of a maximum length of 8192 bytes.
Documentation
Full documentation can be found at https://innmind.org/io/.