mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 12:26:34 -05:00
wrap most posix filesystem functions
This commit is contained in:
parent
18d684cd16
commit
1dc7bff6e6
69 changed files with 1262 additions and 227 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue