Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: I86dda70ea0201a0a2f4ec4b0bfd58a5af86e9ae0
void chown(uid_t uid, gid_t gid, bool recursive = false);
void chmod(mode_t mode, bool recursive = false);
+ const std::string readlink() const;
+
const std::string& getPath() const
{
return path;
}
}
+const std::string File::readlink() const
+{
+ char buf[PATH_MAX];
+ if (::readlink(path.c_str(), buf, PATH_MAX) == -1) {
+ throw runtime::Exception(runtime::GetSystemErrorMessage());
+ }
+ return buf;
+}
+
void File::lock() const
{
if (::flock(descriptor, LOCK_EX) == -1) {