26 #ifndef O2SCL_CLOUD_FILE_H 27 #define O2SCL_CLOUD_FILE_H 35 #ifdef O2SCL_USE_BOOST_FILESYSTEM 36 #include <boost/filesystem.hpp> 39 #include <o2scl/err_hnd.h> 40 #include <o2scl/hdf_file.h> 42 #ifndef DOXYGEN_NO_O2NS 86 static const int sha256=0;
87 static const int md5=1;
88 static const int md5sum=2;
97 std::string url, std::string dir=
"");
104 std::string url, std::string dir=
"");
111 std::string url, std::string dir=
"");
118 std::string subdir, std::string url,
125 int get_file(std::string file, std::string url,
126 std::string &fname, std::string dir=
"");
131 int get_file_hash(std::string file, std::string hash, std::string url,
132 std::string &fname, std::string dir=
"");
137 int get_file_subdir(std::string file, std::string subdir, std::string url,
138 std::string &fname, std::string dir=
"");
155 std::string subdir, std::string url,
156 std::string &fname, std::string dir=
"");
160 #ifndef DOXYGEN_NO_O2NS int hash_type
Current hash type (default sha256)
int hdf5_open_hash(hdf_file &hf, std::string file, std::string hash, std::string url, std::string dir="")
Open an HDF file named file in directory dir with hash hash, downloading from URL url if necessary...
int get_file_subdir(std::string file, std::string subdir, std::string url, std::string &fname, std::string dir="")
Get file named file in directory dir in subdirectory subdir from url url.
int hdf5_open_subdir(hdf_file &hf, std::string file, std::string subdir, std::string url, std::string dir="")
Open an HDF file named file in directory dir in subdirectory subdir, downloading from URL url if nece...
std::string env_var
The environment variable which stores the directory (default "")
Read a file and download from a URL if necessary.
int get_file_hash_subdir(std::string file, std::string hash, std::string subdir, std::string url, std::string &fname, std::string dir="")
Get file named file in directory dir in subdirectory subdir from url url.
int verbose
Verbosity parameter (default 1)
bool allow_wget
If true, allow the use of wget to download the file (default true)
The O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl namespace ...
bool allow_curl
If true, allow the use of curl to download the file (default true)
bool throw_on_fail
If true, throw an exception on failure (default true)
int hdf5_open(hdf_file &hf, std::string file, std::string url, std::string dir="")
Open an HDF file named file in directory dir downloading from URL url if necessary.
Store data in an O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$sc...
int get_file_hash(std::string file, std::string hash, std::string url, std::string &fname, std::string dir="")
Get file named file in directory dir in subdirectory subdir from url url.
int get_file(std::string file, std::string url, std::string &fname, std::string dir="")
Get file named file in directory dir from url url.
int hdf5_open_hash_subdir(hdf_file &hf, std::string file, std::string hash, std::string subdir, std::string url, std::string dir="")
Open an HDF file named file in directory dir in subdirectory subdir with hash hash, downloading from URL url if necessary.