library io
An io library for PHP
philasearch/io
An io library for PHP
- Wednesday, September 10, 2014
- by tmuntan1
- Repository
- 1 Watchers
- 1 Stars
- 7,917 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 2 Versions
- 5 % Grown
, (*1)
PHP IO
PHP IO is a small library built to work with directories and folders., (*2)
Usage
```php
<?php, (*3)
use Philasearch\IO\Directory as Directory;
use Philasearch\IO\File as File;, (*4)
$dir = new Directory( '/path/to/directory' );, (*5)
$files = $dir->getFiles(); // returns an array of files, (*6)
foreach ( $files as $file )
{
$file->readFile(); // returns the file contents as a string
$file->getPath(); // returns the file path
$file->getName(); // returns the file name
}, (*7)