PHP code example of iamgold / doublesfs

1. Go to this page and download the library: Download iamgold/doublesfs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iamgold / doublesfs example snippets


use iamgold\doublesfs\storages\LocalStorage;

$config = [
    'sourcePath' => __DIR__ . '/source'
];

$storage = new LocalStorage($config);

// put file
(bool) $storage->put($source, $key, $options);

// put contents
(bool) $storage->putContents($contents, $key, $options);

// delete file
(bool) $storage->delete($key);