get_compressed_file
- gmx.get_compressed_file(fname)[source]
Check if the input file or a compressed version of it exsists.
Check if the input file exsists. If it does not exist, check whether a file with the same name but with one of the following extensions exsists:
.gz
.bz2
.xz
.lzma
Files are checked in the given order. The name of the first file found will be returned. If none of the files exsists, an exception is raised.
- Parameters:
fname (
str
orbytes
oros.PathLike
) – Name of the input file.- Returns:
- Raises:
FileNotFoundError : – If neither the input file itself nor the input file with one of the above mentioned extensions exists.