wrap most posix filesystem functions

This commit is contained in:
Antonio SJ Musumeci 2016-10-19 09:28:06 -04:00
parent 18d684cd16
commit 1dc7bff6e6
69 changed files with 1262 additions and 227 deletions

View file

@ -14,10 +14,10 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/statvfs.h>
#include <string>
#include <sys/statvfs.h>
#include "success_fail.hpp"
namespace StatVFS
@ -30,21 +30,6 @@ namespace StatVFS
return (st.f_flag & ST_RDONLY);
}
static
inline
bool
readonly(const std::string &path)
{
int rv;
struct statvfs st;
rv = ::statvfs(path.c_str(),&st);
if(STATVFS_FAILED(rv))
return false;
return readonly(st);
}
static
inline
uint64_t