Skip to content

Commit 9beecb5

Browse files
committed
1 parent 4a5dc66 commit 9beecb5

File tree

1 file changed

+39
-42
lines changed

1 file changed

+39
-42
lines changed

README.md

+39-42
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,58 @@
1-
# codemasher/php-filereader
1+
# chillerlan/php-filereader
2+
A simple file/directory reader for all (well, most... ok. some.) of your file-reading needs.
23

34
[![version][packagist-badge]][packagist]
45
[![license][license-badge]][license]
56
[![Travis][travis-badge]][travis]
67
[![Coverage][coverage-badge]][coverage]
78
[![Scrunitizer][scrutinizer-badge]][scrutinizer]
8-
[![Code Climate][codeclimate-badge]][codeclimate]
9+
[![Packagist downloads][downloads-badge]][downloads]
10+
[![PayPal donate][donate-badge]][donate]
911

10-
[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-filereader.svg
12+
[packagist-badge]: https://img.shields.io/packagist/v/chillerlan/php-filereader.svg?style=flat-square
1113
[packagist]: https://packagist.org/packages/chillerlan/php-filereader
12-
[license-badge]: https://img.shields.io/packagist/l/chillerlan/php-filereader.svg
13-
[license]: https://github.com/codemasher/php-filereader/blob/master/LICENSE
14-
[travis-badge]: https://img.shields.io/travis/codemasher/php-filereader.svg
15-
[travis]: https://travis-ci.org/codemasher/php-filereader
16-
[coverage-badge]: https://img.shields.io/codecov/c/github/codemasher/php-filereader.svg
17-
[coverage]: https://codecov.io/github/codemasher/php-filereader
18-
[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/codemasher/php-filereader.svg
19-
[scrutinizer]: https://scrutinizer-ci.com/g/codemasher/php-filereader
20-
[codeclimate-badge]: https://img.shields.io/codeclimate/github/codemasher/php-filereader.svg
21-
[codeclimate]: https://codeclimate.com/github/codemasher/php-filereader
22-
23-
##Info
24-
25-
A simple file/directory reader for all (well, most...) of your file-reading needs.
26-
27-
## Requirements
14+
[license-badge]: https://img.shields.io/github/license/chillerlan/php-filereader.svg?style=flat-square
15+
[license]: https://github.com/chillerlan/php-filereader/blob/master/LICENSE
16+
[travis-badge]: https://img.shields.io/travis/chillerlan/php-filereader.svg?style=flat-square
17+
[travis]: https://travis-ci.org/chillerlan/php-filereader
18+
[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/php-filereader.svg?style=flat-square
19+
[coverage]: https://codecov.io/github/chillerlan/php-filereader
20+
[scrutinizer-badge]: https://img.shields.io/scrutinizer/g/chillerlan/php-filereader.svg?style=flat-square
21+
[scrutinizer]: https://scrutinizer-ci.com/g/chillerlan/php-filereader
22+
[downloads-badge]: https://img.shields.io/packagist/dt/chillerlan/php-filereader.svg?style=flat-square
23+
[downloads]: https://packagist.org/packages/chillerlan/database/stats
24+
[donate-badge]: https://img.shields.io/badge/donate-paypal-ff33aa.svg?style=flat-square
25+
[donate]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WLYUNAT9ZTJZ4
26+
27+
# Requirements
2828
- PHP 7+
2929

30-
## Documentation
30+
# Documentation
3131

32-
### Installation
33-
#### Using [composer](https://getcomposer.org)
32+
## Installation
33+
**requires [composer](https://getcomposer.org)**
3434

35-
*Terminal*
36-
```sh
37-
composer require chillerlan/php-filereader:dev-master
38-
```
39-
40-
*composer.json*
35+
### *composer.json*
36+
(note: replace `dev-master` with a [version boundary](https://getcomposer.org/doc/articles/versions.md#summary))
4137
```json
4238
{
4339
"require": {
44-
"php": ">=7.0.3",
45-
"chillerlan/php-filereader": "dev-master"
40+
"php": ">=7.2.0",
41+
"chillerlan/database": "dev-master"
4642
}
4743
}
4844
```
4945

50-
#### Manual installation
51-
Download the desired version of the package from [master](https://github.com/codemasher/php-filereader/archive/master.zip) or
52-
[release](https://github.com/codemasher/php-filereader/releases) and extract the contents to your project folder.
53-
Point the namespace `chillerlan\Filereader` to the folder `src` of the package.
46+
### Manual installation
47+
Download the desired version of the package from [master](https://github.com/chillerlan/php-filereader/archive/master.zip) or
48+
[release](https://github.com/chillerlan/php-filereader/releases) and extract the contents to your project folder. After that:
49+
- run `composer install` to install the required dependencies and generate `/vendor/autoload.php`.
50+
- if you use a custom autoloader, point the namespace `chillerlan\Filereader` to the folder `src` of the package
5451

5552
Profit!
5653

57-
### Usage
58-
#### simple
54+
## Usage
55+
### simple
5956
You can just invoke one a `FSDriverInterface` and use it right away:
6057

6158
```php
@@ -66,7 +63,7 @@ $filereader->isDir('/some/path');
6663

6764
```
6865

69-
#### advanced
66+
### advanced
7067
```php
7168
$directory = new Directory($filereader, '/some/path');
7269

@@ -78,8 +75,8 @@ foreach($directory->read() as $file){
7875

7976
```
8077

81-
### API
82-
#### `FSDriverInterface` methods
78+
## API
79+
### `FSDriverInterface` methods
8380
method | return
8481
------ | ------
8582
`fileExists(string $path)` | bool
@@ -93,7 +90,7 @@ method | return
9390
`deleteDir(string $path)` | bool
9491
`rename(string $oldname, string $newname, bool $overwrite = true)` | bool
9592

96-
#### `Directory` public methods
93+
### `Directory` public methods
9794
method | return
9895
------ | ------
9996
`__construct(FSDriverInterface $driver, string $path)` | -
@@ -103,7 +100,7 @@ method | return
103100
`delete(string $subdir = null)` | bool
104101
`rename(string $newname, bool $overwrite = true)` | `Directory`
105102

106-
#### `File` public methods
103+
### `File` public methods
107104
method | return
108105
------ | ------
109106
`__construct(FSDriverInterface $driver, Directory $directory, string $name)` | -
@@ -123,4 +120,4 @@ property | type | description
123120
property | type | description
124121
-------- | ---- | -----------
125122
`$name` | string | the basename of the file
126-
`$directory` | `Directory` | the `Directory` which contains the file
123+
`$directory` | `Directory` | the `Directory` which contains the file

0 commit comments

Comments
 (0)