2009-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Use FileEntry::exists()
	* src/MultiDiskAdaptor.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-03-11 15:38:25 +00:00
parent 3a814ddf5b
commit aecd8bbfeb
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2009-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use FileEntry::exists()
* src/MultiDiskAdaptor.cc
2009-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added exists()

View File

@ -111,7 +111,7 @@ void DiskWriterEntry::closeFile()
bool DiskWriterEntry::fileExists()
{
return File(getFilePath()).exists();
return fileEntry->exists();
}
uint64_t DiskWriterEntry::size() const
@ -467,10 +467,9 @@ ssize_t MultiDiskAdaptor::readData(unsigned char* data, size_t len, off_t offset
bool MultiDiskAdaptor::fileExists()
{
// TODO Use FileEntry::fileExists() here.
for(std::deque<SharedHandle<FileEntry> >::iterator i =
fileEntries.begin(); i != fileEntries.end(); ++i) {
if(File((*i)->getPath()).exists()) {
if((*i)->exists()) {
return true;
}
}