DiskFilesystemService
classe DiskFilesystemService implémente FilesystemInterface (Voir la source)
Méthodes
MountFilesystem constructor.
Get the base directory
Put other file content in given file
Add content after the contents of the file
Add content before the contents of the file
Delete file or directory
List the files of a folder passed as a parameter
List the folder of a folder passed as a parameter
Create a directory
Recover the contents of the file
Copy the contents of a source file to a target file.
Renames or moves a source file to a target file.
Check the existence of a file or directory
The file extension
isFile alias of is_file.
isDirectory alias of is_dir.
Resolves file path.
Détails
        
                            
    __construct(string $base_directory)
        
    
    MountFilesystem constructor.
        
                            string
    getBaseDirectory()
        
    
    Get the base directory
        
                            array|bool
    store(UploadFile $file, string|null $location = null, array $option = [])
        
    
    Function to upload a file
        
                            bool
    put(string $file, string $content)
        
    
    Put other file content in given file
        
                            bool
    append(string $file, string $content)
        
    
    Add content after the contents of the file
        
                            bool
    prepend(string $file, string $content)
        
    
    Add content before the contents of the file
        
                            bool
    delete(string $file)
        
    
    Delete file or directory
        
                            array
    files(string $dirname)
        
    
    List the files of a folder passed as a parameter
        
                            array
    directories(string $dirname)
        
    
    List the folder of a folder passed as a parameter
        
                            bool
    makeDirectory(string $dirname, int $mode = 0777)
        
    
    Create a directory
        
                            string|null
    get(string $filename)
        
    
    Recover the contents of the file
        
                            bool
    copy(string $target, string $source)
        
    
    Copy the contents of a source file to a target file.
        
                            bool
    move(string $target, string $source)
        
    
    Renames or moves a source file to a target file.
        
                            bool
    exists(string $filename)
        
    
    Check the existence of a file or directory
        
                            string|null
    extension(string $filename)
        
    
    The file extension
        
                            bool
    isFile(string $filename)
        
    
    isFile alias of is_file.
        
                            bool
    isDirectory(string $dirname)
        
    
    isDirectory alias of is_dir.
        
                            string
    path(string $filename)
        
    
    Resolves file path.
Give the absolute path of a path