PySpark Plaso Release 2019 A tool for distributed extraction of timestamps from various files using extractors adapted from the Plaso engine to Apache Spark.

Public Member Functions | List of all members
plaso.tarzan.file.generic_file.FileObject Class Reference
Inheritance diagram for plaso.tarzan.file.generic_file.FileObject:
[legend]
Collaboration diagram for plaso.tarzan.file.generic_file.FileObject:
[legend]

## Public Member Functions
def | close (self)
def | read (self, size)
def | seek (self, offset, whence)

## Detailed Description

    Abstract class for a generic file.

## Member Function Documentation

## ◆ close()

def plaso.tarzan.file.generic_file.FileObject.close | ( |  | self | ) |

    Close the file.

Reimplemented in plaso.tarzan.file.hdfs_file.HdfsFileObject, and plaso.tarzan.file.file.LocalFileObject.

## ◆ read()

def plaso.tarzan.file.generic_file.FileObject.read | ( |  | self,
|  |  | size
| ) |  |

    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

Reimplemented in plaso.tarzan.file.hdfs_file.HdfsFileObject, and plaso.tarzan.file.file.LocalFileObject.

## ◆ seek()

def plaso.tarzan.file.generic_file.FileObject.seek | ( |  | self,
|  |  | offset,
|  |  | whence
| ) |  |

    Set a position in the file for future reading or writing.
    :param offset: the position as an offset
    :param whence: from where the position should be reached (the beginning, the end, etc.)

Reimplemented in plaso.tarzan.file.file.LocalFileObject, and plaso.tarzan.file.hdfs_file.HdfsFileObject.

The documentation for this class was generated from the following file:

- /home/rychly/repos/pyspark-plaso/src/plaso/tarzan/file/generic_file.py