tleckie/file-resolver

1.0.1 2021-04-28 12:39 UTC

This package is auto-updated.

Last update: 2022-06-12 16:06:00 UTC


README

Latest Version on Packagist Scrutinizer Code Quality Build Status Total Downloads Code Intelligence Status

Simple file resolver.

Installation

You can install the package via composer:

composer require tleckie/file-resolver

Usage

<?php

require "vendor/autoload.php";

use Tleckie\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