PHP code example of dnj / tmp-filesystem

1. Go to this page and download the library: Download dnj/tmp-filesystem 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/ */

    

dnj / tmp-filesystem example snippets



use dnj\Filesystem\Tmp\File;

$tmpFile = new File();
echo $tmppFile->getPath(); // prints the path of temporary file, in linux, it's may something like this: /tmp/qyiuqgi


use dnj\Filesystem\Tmp\Directory;

$tmpDirectory = new Directory();
echo $tmpDirectory->getPath(); // prints the path of temporary directory, in linux, it's may something like this: /tmp/qyiuqgi