ndcctools.taskvine.file.File Class Reference

TaskVine File Object. More...

Inheritance diagram for ndcctools.taskvine.file.File:

## Public Member Functions

| source (self)
| Return the path of the file if a regular file, else None.
| type (self)
| Return the enum type of this file.
| set_mode (self, mode)
| Set the Unix mode permission bits for the remote file.
| contents (self, unserializer=None)
| Return the contents of a file object as a string.
| __len__ (self)
| Return the size of a file object, in bytes.

## Detailed Description

TaskVine File Object.

The superclass of all TaskVine file types.

## Member Function Documentation

## source()

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

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

Parameters

  self | A file object.

## type()

ndcctools.taskvine.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

  self | A file object.

## set_mode()

ndcctools.taskvine.file.File.set_mode | ( |  | self,
|  |  | mode )

Set the Unix mode permission bits for the remote file.

Parameters

  self | A file object.
  mode | Unix mode bits.

## contents()

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

  self | A file object.
  unserializer | A function to interpret file contents (e.g. cloudpickle.load)

## __len__()

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

Return the size of a file object, in bytes.

Parameters

  self | A file object.

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

- file.py