PYME.IO.clusterListing module¶
This file provides utility functions for creating and interpreting clusterIO directory listings. Predominately server-side functionality, but the FileInfo and aggregate_dirlisting() are used from the client too.
- class PYME.IO.clusterListing.DirCache(cache_size=1000, lifetime_s=30.0)¶
Bases:
object
- dir_lock(dirname)¶
- 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(type, size)¶
Bases:
tuple
Create new instance of FileInfo(type, size)
- property size¶
Alias for field number 1
- property 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_listdict
a dictionary mapping filenames to FileInfo.
- single_dirdict
a dictionary mapping filenames to tuples, as returned by a json load of a single directory listing.
- Returns
- PYME.IO.clusterListing.list_directory(path)¶
- PYME.IO.clusterListing.list_directory_p(path)¶