graze / data-file
File manipulation
Installs: 122
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 13
Forks: 0
Open Issues: 0
pkg:composer/graze/data-file
Requires
- php: >=5.6.0
- graze/array-filter: ^1.0
- graze/csv-token: ^0.3
- graze/data-node: ^1.0
- graze/data-structure: ^2.0
- guzzlehttp/psr7: ^1.3
- league/flysystem: ^1.0
- psr/log: ^1.0
- symfony/process: ^3.0
Requires (Dev)
- akamon/mockery-callable-mock: ^1.0
- graze/standards: ^1.0
- league/flysystem-memory: ^1.0
- mockery/mockery: ^0.9.4
- phpunit/phpunit: 5.*
- squizlabs/php_codesniffer: ^2.5
This package is auto-updated.
Last update: 2025-10-24 06:47:17 UTC
README
File manipulation classes
Install
Via Composer
$ composer require graze/data-file
Interfaces
- FileModifierInterface- Modify a single file
- FileExpanderInterface- Expand a single file into a collection of files
- FileContractorInterface- Contract a collection of files into a single file
- FileTransferInterface- Transfer a file to another file system
- FileFinderInterface- Find files based on a configuration
- FormatInterface- Format information about a file
- FormatterInterface- How to format a file based on a format
- ParserInterface- Parse a stream of data
- ReaderInterface- Read a stream
- WriterInterface- Write a stream
Things it does
- Finder: MetadataFinder- Will find files based on their metadata (size, created time, etc)
- Format: CsvFormat,JsonFormat- Defines how a csv or json file is formatted- Formatter: CsvFormatter,JsonFormatter- Format data into csv or json file
- Parse: CsvParser,JsonParser- Parse a file containing csv, or json data
 
- Formatter: 
- Modify
- Compression: Gzip,Zip,FindCompression- Compress, decompress and find the compression of files
- Merge: Merge- Join multiple files into a single file
- Transfer: Transfer- Transfer a file from any thephpleague/flysystem Filesystem to another filesystem
- Encoding: ConvertEncoding,FindEncoding- Change or find the encoding of a file
- Line manipulation: Head,Tail- Retrieve a segment of a file
- Replace Text: ReplaceText- Replace all instances of a string with another string
- ReFormat: ReFormat- Read a file in 1 format and convert to another
 
- Compression: 
- IO
- Read: FileReader,StreamReader- Read a file/stream in a specified format
- Write: FileWriter,StreamWriter- Write a file/stream in a specified format
 
- Read: 
Testing
$ make test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email security@graze.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.