cctools
ndcctools.taskvine.file.File Class Reference
Inheritance diagram for ndcctools.taskvine.file.File:

Public Member Functions

def source (self)
 Return the path of the file if a regular file, else None. More...
 
def file_type (self)
 Return the enum type of this file. More...
 
def contents (self, unserializer=None)
 Return the contents of a file object as a string. More...
 
def __len__ (self)
 Return the size of a file object, in bytes. More...
 

Detailed Description

TaskVine File Object

The superclass of all TaskVine file types.

Member Function Documentation

◆ source()

def ndcctools.taskvine.file.File.source (   self)

Return the path of the file if a regular file, else None.

Parameters
selfA file object.

◆ file_type()

def ndcctools.taskvine.file.File.file_type (   self)

Return the enum type of this file.

(e.g., VINE_FILE, VINE_TEMP, etc.) Typically used to return the contents of an output buffer.

Parameters
selfA file object.

◆ contents()

def ndcctools.taskvine.file.File.contents (   self,
  unserializer = None 
)

Return the contents of a file object as a string.

Typically used to return the contents of an output buffer.

Parameters
selfA file object.
unserializerA function to interpret file contents (e.g. cloudpickle.load)

◆ __len__()

def ndcctools.taskvine.file.File.__len__ (   self)

Return the size of a file object, in bytes.

Parameters
selfA file object.

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