write_cache#

gwpy.io.cache.write_cache(
cache: Iterable[FileSystemPath],
fobj: IO,
*,
format: Literal['lal', 'ffl'] | None = None,
) None[source]#

Write a list of cache entries to a file.

Parameters:
cachelist of str or os.PathLike

The list of path-like things to write.

fobjfile, str, pathlib.Path

The open file object, or file path to write to.

formatstr, optional

The format to write to, one of

  • None : format each entry using str

  • 'lal' : write a LAL-format cache

  • 'ffl' : write an FFL-format cache