diff --git a/ChangeLog b/ChangeLog index 537047fc..f61cf4b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-12 Tatsuhiro Tsujikawa + + Added exists() + * src/FileEntry.cc + * src/FileEntry.h + 2009-03-10 Tatsuhiro Tsujikawa Added missing prefix dir. diff --git a/src/FileEntry.cc b/src/FileEntry.cc index 96f68c5e..8abc1a5d 100644 --- a/src/FileEntry.cc +++ b/src/FileEntry.cc @@ -69,4 +69,9 @@ bool FileEntry::operator<(const FileEntry& fileEntry) const return offset < fileEntry.offset; } +bool FileEntry::exists() const +{ + return File(getPath()).exists(); +} + } // namespace aria2 diff --git a/src/FileEntry.h b/src/FileEntry.h index 32efb0a6..5d036a70 100644 --- a/src/FileEntry.h +++ b/src/FileEntry.h @@ -99,6 +99,8 @@ public: } bool operator<(const FileEntry& fileEntry) const; + + bool exists() const; }; typedef SharedHandle FileEntryHandle;