00001
00002
00003
00004
00005
00006 #ifndef SAGA_FILE_HPP
00007 #define SAGA_FILE_HPP
00008
00009 #include <iostream>
00010 #include <saga/saga-defs.hpp>
00011
00013 #if !defined(SAGA_HAVE_PACKAGE_FILE) || !defined(SAGA_HAVE_PACKAGE_NAMESPACE)
00014 #define SAGA_GUARDED_EXEC(BLOCK)
00015 #else
00016 #define SAGA_GUARDED_EXEC(BLOCK) \
00017 try{ \
00018 BLOCK \
00019 } \
00020 catch (saga::exception const& e) { \
00021 std::cerr << e.what () << std::endl; \
00022 } \
00023 catch (std::exception const& e) { \
00024 std::cerr << e.what() << std::endl; \
00025 } \
00026 catch (...) { \
00027 std::cerr << std::endl; \
00028 } \
00029
00030 #endif
00031
00033
00034 void run_test (std::string fileURL);
00035
00036 void run_benchmarks (std::string smallFile, std::string bigFile, std::string targetDir, int copyIterations);
00037
00038 void file_cat (std::string fileURL);
00039
00040 void file_remove (std::string fileURL);
00041
00042 void file_copy (std::string sourceURL, std::string targetURL);
00043
00044 void file_move (std::string sourceURL, std::string targetURL);
00045
00046 void list_dir (std::string directoryURL);
00047
00048 #endif