diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-03-09 13:46:27 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-03-09 13:46:27 -0800 |
commit | 9157d664daca5dcefd4ae8fcc2d5ae81484ce750 (patch) | |
tree | e65553e0eff7ff0a696d8f5fda350ebe18b597ed /src/cstore/unionfs/cstore-unionfs.hpp | |
parent | f89d5f769a7369378fe78ad8f5141a1e7aeafa93 (diff) | |
download | vyatta-cfg-9157d664daca5dcefd4ae8fcc2d5ae81484ce750.tar.gz vyatta-cfg-9157d664daca5dcefd4ae8fcc2d5ae81484ce750.zip |
switch query functions to use lower-level API directly.
Diffstat (limited to 'src/cstore/unionfs/cstore-unionfs.hpp')
-rw-r--r-- | src/cstore/unionfs/cstore-unionfs.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.hpp b/src/cstore/unionfs/cstore-unionfs.hpp index 47bfe26..53c6396 100644 --- a/src/cstore/unionfs/cstore-unionfs.hpp +++ b/src/cstore/unionfs/cstore-unionfs.hpp @@ -32,6 +32,7 @@ namespace cstore { // begin namespace cstore namespace b_fs = boost::filesystem; +namespace b_s = boost::system; class UnionfsCstore : public Cstore { public: @@ -222,15 +223,14 @@ private: void recursive_copy_dir(const b_fs::path& src, const b_fs::path& dst); // boost fs operations wrappers - bool b_fs_exists(const b_fs::path& path) { - try { return b_fs::exists(path); } catch (...) { return false; } - }; - bool b_fs_is_directory(const b_fs::path& path) { - try { return b_fs::is_directory(path); } catch (...) { return false; } - }; - bool b_fs_is_regular(const b_fs::path& path) { - try { return b_fs::is_regular(path); } catch (...) { return false; } - }; + bool b_fs_get_file_status(const char *path, b_fs::file_status& fs) { + b_s::error_code ec; + fs = b_fs::detail::status_api(path, ec); + return (!ec); + }; + bool path_exists(const char *path); + bool path_is_directory(const char *path); + bool path_is_regular(const char *path); }; } // end namespace cstore |