Download the PHP package plinker/files without Composer
On this page you can find all versions of the php package plinker/files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download plinker/files
More information about plinker/files
Files in plinker/files
Package files
Short Description A files component which allows you to read and write files
License MIT
Homepage https://github.com/plinker-rpc
Informations about the package files
PlinkerRPC - Files
A files component which allows you to read and write files.
Install
Require this package with composer using the following command:
Client
Creating a client instance is done as follows:
<?php
require 'vendor/autoload.php';
/**
* Initialize plinker client.
*
* @param string $server - URL to server listener.
* @param string $config - server secret, and/or a additional component data
*/
$client = new \Plinker\Core\Client(
'http://example.com/server.php',
[
'secret' => 'a secret password'
]
);
// or using global function
$client = plinker_client('http://example.com/server.php', 'a secret password');
Methods
Once setup, you call the class though its namespace to its method.
List
List files and folders.
Parameter | Type | Description | Default |
---|---|---|---|
dir | string | Base path to list files and folders from | ./ |
extended | bool | Return extended fileinfo | false |
depth | int | Iterator depth | 10 |
Call
Response
Response (with extended true)
Create File
Create/Put a file, if file already exists, it will be overwritten.
Parameter | Description | Default |
---|---|---|
path | File path | |
contents | Contents of the file | |
flags | File operations flags | 0 |
Call
Response
Get File
Get a file.
Parameter | Description | Default |
---|---|---|
path | File path |
Call
Response
Delete File
Delete a file.
Parameter | Description | Default |
---|---|---|
path | File path |
Call
Response
Testing
There are no tests setup for this component.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please contact me via https://cherone.co.uk instead of using the issue tracker.
Credits
Development Encouragement
If you use this project and make money from it or want to show your appreciation, please feel free to make a donation https://www.paypal.me/lcherone, thanks.
Sponsors
Get your company or name listed throughout the documentation and on each github repository, contact me at https://cherone.co.uk for further details.
License
The MIT License (MIT). Please see License File for more information.
See the organisations page for additional components.