public static function create($path)
    {
        $file = new static($path);

        if (! is_dir(dirname($path))) {
            mkdir(dirname($path), 0755, true);
        }

        if (! $file->exists()) {
            touch($path);
        }

        return $file;
    }
public static function create($path)
    {
        $file = new static($path);

        if (! is_dir(dirname($path))) {
            mkdir(dirname($path), 0755, true);
        }

        if (! $file->exists()) {
            touch($path);
        }

        return $file;
    }
public static function create ( $ path ) { $ file = new static ( $ path ) ; if ( ! is_dir ( dirname ( $ path ) ) ) { mkdir ( dirname ( $ path ) , 0755 , true ) ; } if ( ! $ file -> exists ( ) ) { touch ( $ path ) ; } return $ file ; }
Create a new instance, including the file and parent directories.

@param $path

@return static
Create a new instance including the file and parent directories .