From: František Dvořák Date: Wed, 9 Oct 2013 12:05:57 +0000 (+0200) Subject: Catalog setSize() and utime() implementation. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=664d9d1771d43550c3e452915348bbbcc1038947;p=dmlite-plugins-vfs.git Catalog setSize() and utime() implementation. --- diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index a11d958..b1787ac 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -1,6 +1,8 @@ /// @file VfsNs.cpp /// @brief VFS namespace. /// @author Alejandro Álvarez Ayllón +#include +#include #include #include #include @@ -216,7 +218,7 @@ void VfsCatalog::setOwner(const std::string& path, uid_t newUid, gid_t newGid, b void VfsCatalog::setSize(const std::string& path, size_t newSize) throw (DmException) { - throw DmException(EACCES, "Write mode not supported"); + wrapCall(truncate(path.c_str(), newSize)); } @@ -239,7 +241,7 @@ void VfsCatalog::setAcl(const std::string& path, const Acl& acl) throw (DmExcept void VfsCatalog::utime(const std::string& path, const struct utimbuf* buf) throw (DmException) { - throw DmException(EACCES, "Write mode not supported"); + utime(path.c_str(), buf); }