- Queries
- All Atoms
- Search
- Advanced Search
Diviner All Atoms
All Atoms
All Atoms
- Browse files or objects in the Phabricator web interface.
- Class
- Method
- Method
- Method
- Method
- Base class for locks, like file locks.
- Class
- On shutdown, we release all the locks. You should not call this method directly. Use @{method:unlock} to release individual locks.
- Method
- Release the lock. Throws an exception on failure, e.g. if the lock is not currently held.
- Method
- Acquire the lock. If lock acquisition fails because the lock is held by another process, throws @{class:PhutilLockException}. Other exceptions indicate that lock acquisition has failed for reasons unrelated to locking.
- Method
- Determine if the lock is currently held.
- Method
- Register a lock for cleanup when the process exits.
- Method
- Get a named lock, if it has been registered.
- Method
- Returns a globally unique name for this lock.
- Method
- Releases the lock.
- Method
- Acquires the lock, or throws @{class:PhutilLockException} if it fails.
- Method
- Build a new lock, given a lock name. The name should be globally unique across all locks.
- Method
- Simple wrapper class for common filesystem tasks like reading and writing files. When things go wrong, this class throws detailed exceptions with good information about what didn't work.
- Class
- Assert that a file or directory exists and is readable.
- Method
- Assert that a file or directory exists and is writable.
- Method
- Assert that a path represents a directory, strictly (i.e., not a file).
- Method
- Assert that a path represents a file, strictly (i.e., not a directory).
- Method
- Assert that nothing exists at a specified location.
- Method
- Assert that something (e.g., a file, directory, or symlink) exists at a specified location.
- Method
- Method
- Determine if two paths are equivalent by resolving symlinks. This is different from resolving both paths and comparing them because resolvePath() only resolves symlinks in parent directories, not the path itself.
- Method
- Locates the full path that an executable binary (like `git` or `svn`) is at the configured `$PATH`.
- Method
- Determine if an executable binary (like `git` or `svn`) exists within the configured `$PATH`.
- Method
- Determine whether or not a path exists in the filesystem. This differs from file_exists() in that it returns true for symlinks. This method does not attempt to resolve paths before testing them.
- Method
- Convert a canonical path to its most human-readable format. It is guaranteed that you can use resolvePath() to restore a path to its canonical format.
- Method
- Test whether a path is descendant from some root path after resolving all symlinks and removing artifacts. Both paths must exists for the relation to obtain. A path is always a descendant of itself as long as it exists.
- Method
- Canonicalize a path by resolving it relative to some directory (by default PWD), following parent symlinks and removing artifacts. If the path is itself a symlink it is left unresolved.
- Method
- Checks if a path is specified as an absolute path.
- Method
- Return all directories between a path and the specified root directory (defaulting to "/"). Iterating over them walks from the path to the root.
- Method
- List files in a directory.
- Method
- Create a temporary directory and return the path to it. You are responsible for removing it (e.g., with Filesystem::remove()) when you are done with it.
- Method
- Create a directory in a manner similar to mkdir(), but throw detailed exceptions on failure.
- Method
- Identify the MIME type of a file. This returns only the MIME type (like text/plain), not the encoding (like charset=utf-8).
- Method
- Generate a random integer value in a given range.
- Method
- Read random alphanumeric characters from /dev/urandom or equivalent. This method operates like @{method:readRandomBytes} but produces alphanumeric output (a-z, 0-9) so it's appropriate for use in URIs and other contexts where it needs to be human readable.
- Method
- Read random bytes from /dev/urandom or equivalent. See also @{method:readRandomCharacters}.
- Method
- Get the last modified time of a file
- Method
- Change the permissions of a file or directory.
- Method
- Internal. Recursively remove a file or an entire directory. Implements the core function of @{method:remove} in a way that works on Windows.
- Method
- Rename a file or directory.
- Method
- Remove a file or directory.
- Method
- Copy a file, preserving file attributes (if relevant for the OS).
- Method
- Append to a file without having to deal with file handles, with detailed exceptions on failure.
- Method
- Write data to unique file, without overwriting existing files. This is useful if you want to write a ".bak" file or something similar, but want to make sure you don't overwrite something already on disk.
- Method
- Write a file in a manner similar to `file_put_contents()`, but only touch the file if the contents are different, and throw detailed exceptions on failure.
- Method
- Write a file in a manner similar to file_put_contents(), but throw detailed exceptions on failure. If the file already exists, it will be overwritten.
- Method
- Make assertions about the state of path in preparation for writeFile() and writeFileIfChanged().
- Method
- Read a file in a manner similar to file_get_contents(), but throw detailed exceptions on failure.
- Method
- Wrapper around `flock()` for advisory filesystem locking. Usage is straightforward:
- Class
- Release the lock. Throws an exception on failure, e.g. if the lock is not currently held.
- Method
- Acquire the lock. If lock acquisition fails because the lock is held by another process, throws @{class:PhutilLockException}. Other exceptions indicate that lock acquisition has failed for reasons unrelated to locking.
- Method
- Create a new lock on a lockfile. The file need not exist yet.
- Method
- Find files on disk matching criteria, like the 'find' system utility. Use of this class is straightforward:
- Class
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Create a new FileFinder.
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
- Method
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0