From b90a220e159dd4636c9510234af5cd942bb2881b Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 7 Sep 2006 14:35:43 +0000 Subject: [PATCH] * Check if individual files are symlinks. * Use the list of indirect links in EntryList when checking for available free diskspace. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@773 e378c898-3ddf-0310-93e7-cc216c733640 --- rak/file_stat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rak/file_stat.h b/rak/file_stat.h index b14abcda..ab32169c 100644 --- a/rak/file_stat.h +++ b/rak/file_stat.h @@ -51,6 +51,9 @@ public: bool update(const char* filename) { return stat(filename, &m_stat) == 0; } bool update(const std::string& filename) { return update(filename.c_str()); } + bool update_link(const char* filename) { return lstat(filename, &m_stat) == 0; } + bool update_link(const std::string& filename) { return update_link(filename.c_str()); } + bool is_regular() const { return S_ISREG(m_stat.st_mode); } bool is_directory() const { return S_ISDIR(m_stat.st_mode); } bool is_character() const { return S_ISCHR(m_stat.st_mode); }