PYME.IO.clusterListing module

This file provides utility functions for creating and interpreting clusterIO directory listings.

class PYME.IO.clusterListing.DirCache(cache_size=1000, lifetime_s=30.0)

Bases: object

Methods

invalidate_directory(dirname)
list_directory(dirname)
update_cache(filename, filesize)
invalidate_directory(dirname)
list_directory(dirname)
update_cache(filename, filesize)
PYME.IO.clusterListing.FILETYPE_SERIES_COMPLETE = 4

Information about a file in a directory listing.

type: is a bitfield consisting of a combination of filetype bits.

size: is the size of the file in bytes, OR the number of entries in a directory

class PYME.IO.clusterListing.FileInfo

Bases: tuple

Attributes

size Alias for field number 1
type Alias for field number 0

Methods

count(...)
index((value, [start, ...) Raises ValueError if the value is not present.
size

Alias for field number 1

type

Alias for field number 0

PYME.IO.clusterListing.aggregate_dirlisting(dir_list, single_dir)

aggregate / add file info in a dir listing

Parameters:

dir_list : dict

a dictionary mapping filenames to FileInfo.

single_dir : dict

a dictionary mapping filenames to tuples, as returned by a json load of a single directory listing.

PYME.IO.clusterListing.list_directory(path)
PYME.IO.clusterListing.list_directory_p(path)