A specialized FilePath which always returns an instance of ExplodingFile from its open method.

Instance Variable fp The ExplodingFile instance most recently returned from the open method.
Method __init__ Initialize an ExplodingFilePath with a name and a reference to the
Method open Create, save, and return a new ExplodingFile.
Method clonePath Undocumented

Inherited from FilePath:

Instance Variable alwaysCreate When opening this file, only succeed if the file does not already exist. (type: bool)
Instance Variable path The path from which 'downward' traversal is permitted. (type: bytes or unicode)
Instance Variable statinfo 0 (WARNING: statinfo is deprecated as of Twisted 15.0.0 and will become a private attribute) The currently cached status information about the file on the filesystem that this FilePath points to. This attribute is None if the file is in an indeterminate state (either this FilePath has not yet had cause to call stat() yet or FilePath.changed indicated that new information is required), 0 if stat() was called and returned an error (i.e. the path did not exist when stat() was called), or a stat_result object that describes the last known status of the underlying file (or directory, as the case may be). Trust me when I tell you that you do not want to use this attribute. Instead, use the methods on FilePath which give you information about it, like getsize(), isdir(), getModificationTime(), and so on. (type: int or None or os.stat_result)
Method __getstate__ Support serialization by discarding cached os.stat results and returning everything else.
Method sep Return a filesystem separator.
Method asBytesMode Return this FilePath in bytes-mode.
Method asTextMode Return this FilePath in unicode-mode.
Method child Create and return a new FilePath representing a path contained by self.
Method preauthChild Use me if path might have slashes in it, but you know they're safe.
Method childSearchPreauth Return my first existing child with a name in paths.
Method siblingExtensionSearch Attempt to return a path with my name, given multiple possible extensions.
Method realpath Returns the absolute target as a FilePath if self is a link, self otherwise.
Method siblingExtension Attempt to return a path with my name, given the extension at ext.
Method linkTo Creates a symlink to self to at the path in the FilePath linkFilePath.
Method restat Re-calculate cached effects of 'stat'. To refresh information on this path after you know the filesystem may have changed, call this method.
Method changed Clear any cached information about the state of this path on disk.
Method chmod Changes the permissions on self, if possible. Propagates errors from os.chmod up.
Method getsize Retrieve the size of this file in bytes.
Method getModificationTime Retrieve the time of last access from this file.
Method getStatusChangeTime Retrieve the time of the last status change for this file.
Method getAccessTime Retrieve the time that this file was last accessed.
Method getInodeNumber Retrieve the file serial number, also called inode number, which distinguishes this file from all other files on the same device.
Method getDevice Retrieves the device containing the file. The inode number and device number together uniquely identify the file, but the device number is not necessarily consistent across reboots or system crashes.
Method getNumberOfHardLinks Retrieves the number of hard links to the file.
Method getUserID Returns the user ID of the file's owner.
Method getGroupID Returns the group ID of the file.
Method getPermissions Returns the permissions of the file. Should also work on Windows, however, those permissions may not be what is expected in Windows.
Method exists Check if this FilePath exists.
Method isdir Check if this FilePath refers to a directory.
Method isfile Check if this file path refers to a regular file.
Method isBlockDevice Returns whether the underlying path is a block device.
Method isSocket Returns whether the underlying path is a socket.
Method islink Check if this FilePath points to a symbolic link.
Method isabs Check if this FilePath refers to an absolute path.
Method listdir List the base names of the direct children of this FilePath.
Method splitext Split the file path into a pair (root, ext) such that root + ext == path.
Method __repr__ Undocumented
Method touch Updates the access and last modification times of the file at this file path to the current time. Also creates the file if it does not already exist.
Method remove Removes the file or directory that is represented by self. If self.path is a directory, recursively remove all its children before removing the directory. If it's a file or link, just delete it.
Method makedirs Create all directories not yet existing in path segments, using os.makedirs.
Method globChildren Assuming I am representing a directory, return a list of FilePaths representing my children that match the given pattern.
Method basename Retrieve the final component of the file path's path (everything after the final path separator).
Method dirname Retrieve all of the components of the FilePath's path except the last one (everything up to the final path separator).
Method parent A file path for the directory containing the file at this file path.
Method setContent Replace the file at this path with a new file that contains the given bytes, trying to avoid data-loss in the meanwhile.
Method __cmp__ Undocumented
Method createDirectory Create the directory the FilePath refers to.
Method requireCreate Sets the alwaysCreate variable.
Method create Exclusively create a file, only if this file previously did not exist.
Method temporarySibling Construct a path referring to a sibling of this path.
Method copyTo Copies self to destination.
Method moveTo Move self to destination - basically renaming self to whatever destination is named.
Method statinfo FilePath.statinfo is deprecated.
Method _asBytesPath Return the path of this FilePath as bytes.
Method _asTextPath Return the path of this FilePath as text.
Method _getPathAsSameTypeAs If pattern is bytes, return FilePath.path as bytes. Otherwise, return FilePath.path as unicode.

Inherited from AbstractFilePath (via FilePath):

Method getContent Retrieve the contents of the file at this path.
Method parents Retrieve an iterator of all the ancestors of this path.
Method children List the children of this path object.
Method walk Yield myself, then each of my children, and each of those children's children in turn.
Method sibling Return a FilePath with the same directory as this instance but with a basename of path.
Method descendant Retrieve a child or child's child of this path.
Method segmentsFrom Return a list of segments between a child and its ancestor.
Method __hash__ Hash the same as another FilePath with the same path as mine.
Method getmtime Deprecated. Use getModificationTime instead.
Method getatime Deprecated. Use getAccessTime instead.
Method getctime Deprecated. Use getStatusChangeTime instead.
fp =
The ExplodingFile instance most recently returned from the open method.
def __init__(self, pathName, originalExploder=None):

Initialize an ExplodingFilePath with a name and a reference to the

ParameterspathNameThe path name as passed to filepath.FilePath. (type: str)
originalExploderThe ExplodingFilePath to associate opened files with. (type: ExplodingFilePath)
def open(self, mode=None):

Create, save, and return a new ExplodingFile.

ParametersmodePresent for signature compatibility. Ignored.
ReturnsA new ExplodingFile.
def clonePath(self, name):
Undocumented
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.