PHP code example of tleckie / file-resolver

1. Go to this page and download the library: Download tleckie/file-resolver 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/ */

    

tleckie / file-resolver example snippets




leckie\FileResolver\Resolver;

$resolver = new Resolver(
    '/tmp/test/',
    'de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3',
    'json',
    4,
    5
);


$resolver->fullName();
// /tmp/test/de9f2/c7fd2/5e1b3/afad3/de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3.json


$resolver->fullPath();
// /tmp/test/de9f2/c7fd2/5e1b3/afad3/


$resolver->file();
// de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3.json