Codesleeve\Stapler\Factories\File::createFromString PHP Method

createFromString() protected static method

Fetch a local file using a string location and convert it into an instance of \Codesleeve\Stapler\File\File.
protected static createFromString ( string $file ) : Codesleeve\Stapler\File\File
$file string
return Codesleeve\Stapler\File\File
    protected static function createFromString($file)
    {
        return new StaplerFile($file, pathinfo($file)['basename']);
    }