copyxnat.xnat.copy_cache module

Abstraction of disk cache used to store XNAT files

class copyxnat.xnat.copy_cache.CacheBox(root_path, reporter)[source]

Bases: object

Controls caches on disk

new_cache(cache_type)[source]

Create a new cache within the main cache

class copyxnat.xnat.copy_cache.CopyCache(cache_type, root_path, reporter, name=None, parent_rel_path='', read_only=False, cache_level=0, base_name=None)[source]

Bases: object

Abstraction of disk cache used to store XNAT files

clear()[source]

Delete contents of cache

full_path()[source]

Return absolute path to this cache

make_output_path()[source]

Write to file to this cache

sub_cache(cache_type, name)[source]

Create a child cache representing some level of the XNAT hierarchy @param cache_type: The type of XNAT item @param name: label for this cache @return:a new CopyCache for this XNAT level

write_xml(xml_root, filename)[source]

Write XML to a file in this cache