• Developer New

    Friday, March 24, 2017

    how to use Files in laravel

    File::exists('path');
    File::get('path');
    File::getRemote('path');
    File::getRequire('path');
    File::requireOnce('path');
    File::put('path', 'contents');
    File::append('path', 'data');
    File::delete('path');
    File::move('path', 'target');
    File::copy('path', 'target');
    File::extension('path');
    File::type('path');
    File::size('path');
    File::lastModified('path');
    File::isDirectory('directory');
    File::isWritable('path');
    File::isFile('file');
    // Find path names matching a given pattern.File::glob($patterns, $flag);
    // Get an array of all files in a directory.File::files('directory');
    // Get all of the files from the given directory (recursive).File::allFiles('directory');
    // Get all of the directories within a given directory.File::directories('directory');
    File::makeDirectory('path',  $mode = 0777, $recursive = false);
    File::copyDirectory('directory', 'destination', $options = null);
    File::deleteDirectory('directory', $preserve = false);
    File::cleanDirectory('directory');

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel