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 | Public Attributes | List of all members
plaso.tarzan.file.file.LocalFileObject Class Reference
Inheritance diagram for plaso.tarzan.file.file.LocalFileObject:
Inheritance graph
[legend]
Collaboration diagram for plaso.tarzan.file.file.LocalFileObject:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self)
 
def open (self, path_spec=None, mode='rb')
 
def close (self)
 
def read (self, size=None)
 
def seek (self, offset, whence=os.SEEK_SET)
 
def tell (self)
 

Public Attributes

 path
 
 file_object
 

Detailed Description

Local file access.

Constructor & Destructor Documentation

◆ __init__()

def plaso.tarzan.file.file.LocalFileObject.__init__ (   self)
Initializes a local file object.

Member Function Documentation

◆ close()

def plaso.tarzan.file.file.LocalFileObject.close (   self)
Close the file.

Reimplemented from plaso.tarzan.file.generic_file.FileObject.

◆ open()

def plaso.tarzan.file.file.LocalFileObject.open (   self,
  path_spec = None,
  mode = 'rb' 
)
Open a local file identified by its path and in a particular mode.
:param path_spec: the path of the file to open
:param mode: the mode of the file opening (and its future usage, i.e., reading, writing, etc.)

◆ read()

def plaso.tarzan.file.file.LocalFileObject.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
:raises OSError: if the read failed

Reimplemented from plaso.tarzan.file.generic_file.FileObject.

◆ seek()

def plaso.tarzan.file.file.LocalFileObject.seek (   self,
  offset,
  whence = os.SEEK_SET 
)
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 from plaso.tarzan.file.generic_file.FileObject.

◆ tell()

def plaso.tarzan.file.file.LocalFileObject.tell (   self)
Get a current position in the file.
:return: the current position (an offset)

Member Data Documentation

◆ file_object

plaso.tarzan.file.file.LocalFileObject.file_object

◆ path

plaso.tarzan.file.file.LocalFileObject.path

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