From: František Dvořák Date: Wed, 10 Jul 2013 12:02:52 +0000 (+0200) Subject: Catalog setSize() and utime() implementation. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=df1c89040e0856c2c2d196611e9702cbd767cd46;p=dmlite-plugins-vfs-old.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); }