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=42828051e7b402a22fbf4d2ab30b109c7ab3e473;p=dmlite-plugins-vfs-old.git Catalog setSize() and utime() implementation. --- diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index 6b8163b..13ce4bd 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 @@ -220,7 +222,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)); } @@ -243,7 +245,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); }