Filesystem
class Filesystem (View source)
A collection of static methods for manipulating the filesystem.
Traits
Provides extensions to this object to integrate it with standard config API methods.
Config options
| file_create_mask | int | ||
| folder_create_mask | int | 
Properties
| protected static | int | $cache_folderModTime | 
Methods
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
Remove a directory and all subdirectories and files.
Remove a directory, but only if it is empty.
Cleanup function to reset all the Filename fields. Visit File/fixfiles to call.
Return the most recent modification time of anything in the folder.
Returns true if the given filename is an absolute file reference.
Details
        
                static            Config_ForClass
    config()
        
    
    Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
        
                            mixed
    stat(string $name)
        deprecated
    
    deprecated
Get inherited config value
        
                            mixed
    uninherited(string $name)
        
    
    Gets the uninherited value for the given config option
        
                            $this
    set_stat(string $name, mixed $value)
        deprecated
    
    deprecated
Update the config value for a given property
        
                static            
    makeFolder(string $folder)
        
    
    Create a folder on the filesystem, recursively.
Uses Filesystem::$folder_create_mask to set filesystem permissions. Use Folder::findOrMake()} to create a {@link Folder database record automatically.
        
                static            
    removeFolder(string $folder, bool $contentsOnly = false)
        
    
    Remove a directory and all subdirectories and files.
        
                static            bool
    remove_folder_if_empty(string $folder, bool $recursive = true)
        
    
    Remove a directory, but only if it is empty.
        
                            
    fixfiles()
        deprecated
    
    deprecated
Cleanup function to reset all the Filename fields. Visit File/fixfiles to call.
        
                static            string
    folderModTime(string $folder, array $extensionList = null)
        
    
    Return the most recent modification time of anything in the folder.
        
                static            bool
    isAbsolute(string $filename)
        
    
    Returns true if the given filename is an absolute file reference.
Works on Linux and Windows.