File-like object for HDFS.
◆ __init__()
def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.__init__ |
( |
|
self, |
|
|
|
resolver_context |
|
) |
| |
Initializes a file-like object.
:param resolver_context: resolver context
◆ get_offset()
def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.get_offset |
( |
|
self | ) |
|
Retrieves the current offset into the file-like object.
:return: current offset into the file-like object
:raises: IOError: if the file-like object has not been opened
◆ get_size()
def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.get_size |
( |
|
self | ) |
|
Retrieves the size of the file-like object.
:return: size of the file-like object data
:raises IOError: if the file-like object has not been opened
◆ read()
def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.read |
( |
|
self, |
|
|
|
size = None |
|
) |
| |
Reads a byte string from the file-like object at the current offset.
The function will read a byte string of the specified size or all of the remaining data
if no size was specified.
:param size: number of bytes to read, where None is all remaining data.
:return: data read
:raises IOError: if the read failed
◆ seek()
def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.seek |
( |
|
self, |
|
|
|
offset, |
|
|
|
whence = os.SEEK_SET |
|
) |
| |
Seeks to an offset within the file-like object.
:param offset: offset to seek to
:param whence: value that indicates whether offset is an absolute or relative position within the file
:raises IOError: if the seek failed
The documentation for this class was generated from the following file: