Skip to content

Commit

Permalink
improve install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Jun 11, 2024
1 parent 1383c07 commit f594619
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
Uses [PHPER framework](https://github.com/phper-framework/phper) and [notify-rs](https://github.com/notify-rs/notify)
to build the extension.

## Installation

In the release download the .so (Linux) or .dylib (macOS) file for your PHP version. Lookup the value of your
exension_dir, move the extension into that directory. Enable the extension by putting an ini-file in the conf.d folder
of your php version. It might look as follows.

```shell
PHP_VERSION=`php -r "echo PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;"`
PHP_EXTENSION_DIR=`php -r "echo ini_get('extension_dir');"`
curl -o "${PHP_EXTENSION_DIR}/libphp_ext_fs_notify.so" "https://github.com/genkgo/php-ext-fs-notify/releases/latest/download/linux-php${PHP_VERSION}-libphp_ext_fs_notify.so"
echo 'extension=libphp_ext_fs_notify.so' > ""/etc/php/${PHP_VERSION}/cli/conf.d/20-libphp_ext_fs_notify.ini"
```
## Usage
Create watcher, add paths to watch and start watching with a callback.
Expand Down

0 comments on commit f594619

Please sign in to comment.