PHP library for file management.
- Installation
- Requirements
- Quick Start and Examples
- Available Methods
- Usage
- Tests
- Exception Handler
- Contribute
- Repository
- Author
- Licensing
The preferred way to install this extension is through composer.
To install PHP File library, simply:
$ composer require Josantonius/File
This library is supported by PHP versions 7.0 or higher and is compatible with HHVM versions 3.0 or higher.
To use this library in HHVM (HipHop Virtual Machine) you will have to activate the scalar types. Add the following line "hhvm.php7.scalar_types = true" in your "/etc/hhvm/php.ini".
To use this class, simply:
require __DIR__ . '/vendor/autoload.php';
use Josantonius\File\File;
Available methods in this library:
File::searchString();
Example of use for this library:
<?php
require __DIR__ . '/vendor/autoload.php';
use Josantonius\File\File;
$search = 'Morbi';
$filepath = getcwd() . '/' . 'resources/file.txt';
File::searchString($search, $filepath); /* bool(true) */
To use the test class, simply:
<?php
$loader = require __DIR__ . '/vendor/autoload.php';
$loader->addPsr4('Josantonius\\File\\Tests\\', __DIR__ . '/vendor/josantonius/file/tests');
use Josantonius\File\Tests\FileTest;
Available test methods in this library:
FileTest::testSearchString();
This library uses exception handler that you can customize.
- Check for open issues or open a new issue to start a discussion around a bug or feature.
- Fork the repository on GitHub to start making your changes.
- Write one or more tests for the new feature or that expose the bug.
- Make code changes to implement the feature or fix the bug.
- Send a pull request to get your changes merged and published.
This is intended for large and long-lived objects.
All files in this repository were created and uploaded automatically with Reposgit Creator.
Maintained by Josantonius.
This project is licensed under MIT license. See the LICENSE file for more info.