toil.fileStores

Submodules

Package Contents

Classes

FileID

A small wrapper around Python's builtin string class.

class toil.fileStores.FileID(fileStoreID, size, executable=False)[source]

Bases: str

digraph inheritance79a256bedf { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "FileID" [URL="#toil.fileStores.FileID",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A small wrapper around Python's builtin string class."]; }

A small wrapper around Python’s builtin string class.

It is used to represent a file’s ID in the file store, and has a size attribute that is the file’s size in bytes. This object is returned by importFile and writeGlobalFile.

Calls into the file store can use bare strings; size will be queried from the job store if unavailable in the ID.

Parameters
  • fileStoreID (str) –

  • size (int) –

  • executable (bool) –

pack()[source]

Pack the FileID into a string so it can be passed through external code.

Return type

str

classmethod forPath(fileStoreID, filePath)[source]
Parameters
  • fileStoreID (str) –

  • filePath (str) –

Return type

FileID

classmethod unpack(packedFileStoreID)[source]

Unpack the result of pack() into a FileID object.

Parameters

packedFileStoreID (str) –

Return type

FileID