API results for “files”

26 to 50 of 142

$files->exists(string $filename, $options = '') apivar.method
Does the given file/link/dir exist?

$files->size(string $path, $options = []) apivar.method
Get size of file or directory (in bytes)

$files->tempDir($name = '', $options = []) apivar.method
Return a new temporary directory/path ready to use for files

$files->find(string $path, array $options = []) apivar.method
Find all files in the given $path recursively, and return a flat array of all found filenames

$files->unzip(string $zipFile, string $destinationPath, array $options = []) apivar.method
Unzips the given ZIP file to the destination directory

$files->zip(string $zipfile, $files, array $options = []) apivar.method
Creates a ZIP file

$files->send($filename, array $options = [], array $headers = []) apivar.method
Send the contents of the given filename to the current http connection

$files->filePutContents(string $filename, $contents, int $flags = 0) apivar.method
Create (overwrite or append) a file, put the $contents in it, and adjust permissions

$files->fileGetContents(string $filename, int $offset = 0, int $maxlen = 0) apivar.method
Get contents of file

$files->getCSV(string $filename, array $options = []) apivar.method
Get next row from a CSV file

$files->getAllCSV(string $filename, array $options = []) apivar.method
Get all rows from a CSV file

$files->render(string $filename, array $vars = [], array $options = []) apivar.method
Given a filename, render it as a ProcessWire template file

$files->include(string $filename, array $vars = [], array $options = []) apivar.method
Include a PHP file passing it all API variables and optionally your own specified variables

$files->includeOnce(string $filename, array $vars = [], array $options = []) apivar.method
Same as include() method except that file will not be executed if it as previously been included

$files->getNamespace(string $file, bool $fileIsContents = false) apivar.method
Get the namespace used in the given .php or .module file

$files->unixDirName(string $dir, bool $trailingSlash = true) apivar.method
Convert given directory name to use unix slashes and enforce trailing or no-trailing slash

$files->unixFileName(string $file) apivar.method
Convert given file name to use unix slashes (if it isn’t already)

$files->fileInPath(string $file, string $path) apivar.method
Is given $file name in given $path name? (aka: is $file a subdirectory somewhere within $path)

$files->currentPath() apivar.method
Get the current path / work directory

$modules->delete(string $class) apivar.method
Delete the given module, physically removing its files

$modules->getModuleLanguageFiles($module) apivar.method
Get module language translation files

$procache->getFiles() apivar.method
Get instance of ProCacheFiles

$procache->getCachePath($page = null, array $options = []) apivar.method
Return the path where we store cache files (optionally for a specific page)

$procache->clearPages(PageArray $items, bool $getFiles = true) apivar.method
Clear the cache for multiple pages

$procache->merge($files, bool $minify = true) apivar.method
Merge the given array or CSV string of file URLs and returned the merged file URL