Home | Trees | Indices | Help |
---|
|
builtins.object --+ | CollectionBase --+ | RichCollectionBase
Base class for Collections and Subcollections.
Implements the majority of functionality relating to accessing items in the Collection.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|
Recursively check for a +R segment locator signature.
|
|
Recursively search the specified file path. May return either a `Collection` or `ArvadosFile`. If not found, will create a new item at the specified path based on `create_type`. Will create intermediate subcollections needed to contain the final item in the path. :create_type: One of `arvados.collection.FILE` or `arvados.collection.COLLECTION`. If the path is not found, and value of create_type is FILE then create and return a new ArvadosFile for the last path component. If COLLECTION, then create and return a new Collection for the last path component.
|
Recursively search the specified file path. May return either a Collection or ArvadosFile. Return None if not found. If path is invalid (ex: starts with '/'), an IOError exception will be raised.
|
Recursive subcollection create. Like `os.makedirs()`. Will create intermediate subcollections needed to contain the leaf subcollection path.
|
Open a file-like object for access. :path: path to a file in the collection :mode: a string consisting of "r", "w", or "a", optionally followed by "b" or "t", optionally followed by "+". :"b": binary mode: write() accepts bytes, read() returns bytes. :"t": text mode (default): write() accepts strings, read() returns strings. :"r": opens for reading :"r+": opens for reading and writing. Reads/writes share a file pointer. :"w", "w+": truncates to 0 and opens for reading and writing. Reads/writes share a file pointer. :"a", "a+": opens for reading and writing. All writes are appended to the end of the file. Writing does not affect the file pointer for reading. |
Determine if the collection has been committed to the API server.
|
Recursively set committed flag. If value is True, set committed to be True for this and all children. If value is False, set committed to be False for this and all parents.
|
Iterate over names of files and collections contained in this collection.
|
Get a file or collection that is directly contained by this collection. If you want to search a path, use `find()` instead.
|
Test if there is a file or collection a directly contained by this collection.
|
Get the number of items directly contained in this collection.
|
Delete an item by name which is directly contained by this collection.
|
Get a list of names of files and collections directly contained in this collection.
|
Get a list of files and collection objects directly contained in this collection.
|
Get a list of (name, object) tuples directly contained in this collection.
|
Remove the file or subcollection (directory) at `path`. :recursive: Specify whether to remove non-empty subcollections (True), or raise an error (False).
|
Copy or move a file or subcollection to this collection. :source_obj: An ArvadosFile, or Subcollection object :target_name: Destination item name. If the target name already exists and is a file, this will raise an error unless you specify `overwrite=True`. :overwrite: Whether to overwrite target file if it already exists. :reparent: If True, source_obj will be moved from its parent collection to this collection. If False, source_obj will be copied and the parent collection will be unmodified.
|
Copy a file or subcollection to a new path in this collection. :source: A string with a path to source file or subcollection, or an actual ArvadosFile or Subcollection object. :target_path: Destination file or path. If the target path already exists and is a subcollection, the item will be placed inside the subcollection. If the target path already exists and is a file, this will raise an error unless you specify `overwrite=True`. :source_collection: Collection to copy `source_path` from (default `self`) :overwrite: Whether to overwrite target file if it already exists.
|
Move a file or subcollection from `source_collection` to a new path in this collection. :source: A string with a path to source file or subcollection. :target_path: Destination file or path. If the target path already exists and is a subcollection, the item will be placed inside the subcollection. If the target path already exists and is a file, this will raise an error unless you specify `overwrite=True`. :source_collection: Collection to copy `source_path` from (default `self`) :overwrite: Whether to overwrite target file if it already exists.
|
Get the manifest text for this collection, sub collections and files. This method does not flush outstanding blocks to Keep. It will return a normalized manifest with access tokens stripped. :stream_name: Name to use for this stream (directory) |
Get the manifest text for this collection, sub collections and files. This method will flush outstanding blocks to Keep. By default, it will not normalize an unmodified manifest or strip access tokens. :stream_name: Name to use for this stream (directory) :strip: If True, remove signing tokens from block locators if present. If False (default), block locators are left unchanged. :normalize: If True, always export the manifest text in normalized form even if the Collection is not modified. If False (default) and the collection is not modified, return the original manifest text even if it is not in normalized form. :only_committed: If True, don't commit pending blocks.
|
Get the manifest text for this collection, sub collections and files. :stream_name: Name to use for this stream (directory) :strip: If True, remove signing tokens from block locators if present. If False (default), block locators are left unchanged. :normalize: If True, always export the manifest text in normalized form even if the Collection is not modified. If False (default) and the collection is not modified, return the original manifest text even if it is not in normalized form. :only_committed: If True, only include blocks that were already committed to Keep.
|
Scan through the entire collection and ask Keep to copy remote blocks. When accessing a remote collection, blocks will have a remote signature (+R instead of +A). Collect these signatures and request Keep to copy the blocks to the local cluster, returning local (+A) signatures. :remote_blocks: Shared cache of remote to local block mappings. This is used to avoid doing extra work when blocks are shared by more than one file in different subdirectories.
|
Generate list of add/modify/delete actions. When given to `apply`, will change `self` to match `end_collection`
|
Apply changes from `diff`. If a change conflicts with a local change, it will be saved to an alternate path indicating the conflict.
|
|
|
|
|
Flush bufferblocks to Keep.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 21 19:09:45 2023 | http://epydoc.sourceforge.net |