Paths final class
Minn\Support\Paths · public/minn/src/Minn/Support/Paths.php · 95 lines
File-system path and permission spellings, and whether a path is safe to use.
Public
| static | validate(mixed $file, mixed $allowed = array ( )): int# | Whether a path is safe to use (validate_file): 0 when it is; 1 when it climbs out (a bare "../", more than one, or one not at the end); 2 for a drive letter; 3 when a list is given and the path is not on it. | |||
| static | translationDir(string $domain, string $locale, string $langDir, ?string $customPath, ?Closure $listed = NULL): string|false# | The trailing-slashed directory holding a text domain's {domain}-{locale}.mo: a custom path first, then the language dir's plugins and themes folders, then the dir itself for the default domain; false when none has the file. $listed, when given, lists a folder's files (the textdomain registry's own lister, which plugins may answer for) and is read instead of the disk.
| |||
| static | normalize(string $path): string# | Forward slashes only, runs collapsed, a stream wrapper kept, a Windows drive letter upper-cased. | |||
| static | symbolicMode(int $mode): string# | The `ls -l` spelling of a mode: type letter, then rwx for owner, group and world with the setuid, setgid and sticky bits folded in. |
Nothing matches.