/// @file VfsNs.cpp
/// @brief VFS namespace.
/// @author Alejandro Álvarez Ayllón <aalvarez@cern.ch>
+#include <sys/types.h>
+#include <utime.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
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));
}
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);
}