From 0455cde2a83286339aa40c943ce6a7987298e5f5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 25 Nov 2010 12:42:07 +0000 Subject: [PATCH] 2010-11-25 Tatsuhiro Tsujikawa Removed unused FileEntry::setupDir() * src/FileEntry.cc * src/FileEntry.h * test/FileEntryTest.cc --- ChangeLog | 7 +++++++ src/FileEntry.cc | 5 ----- src/FileEntry.h | 2 -- test/FileEntryTest.cc | 19 ------------------- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c706c0c..4f5084bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-25 Tatsuhiro Tsujikawa + + Removed unused FileEntry::setupDir() + * src/FileEntry.cc + * src/FileEntry.h + * test/FileEntryTest.cc + 2010-11-25 Tatsuhiro Tsujikawa Removed MultiDiskAdaptor::mkdir() because directory structure is diff --git a/src/FileEntry.cc b/src/FileEntry.cc index 59c74fc5..767d65da 100644 --- a/src/FileEntry.cc +++ b/src/FileEntry.cc @@ -74,11 +74,6 @@ FileEntry::FileEntry() FileEntry::~FileEntry() {} -void FileEntry::setupDir() -{ - util::mkdirs(File(path_).getDirname()); -} - FileEntry& FileEntry::operator=(const FileEntry& entry) { if(this != &entry) { diff --git a/src/FileEntry.h b/src/FileEntry.h index 3fa6444d..4c319e85 100644 --- a/src/FileEntry.h +++ b/src/FileEntry.h @@ -106,8 +106,6 @@ public: void setRequested(bool flag) { requested_ = flag; } - void setupDir(); - const std::deque& getRemainingUris() const { return uris_; diff --git a/test/FileEntryTest.cc b/test/FileEntryTest.cc index 682b4432..cde3b677 100644 --- a/test/FileEntryTest.cc +++ b/test/FileEntryTest.cc @@ -10,7 +10,6 @@ namespace aria2 { class FileEntryTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(FileEntryTest); - CPPUNIT_TEST(testSetupDir); CPPUNIT_TEST(testRemoveURIWhoseHostnameIs); CPPUNIT_TEST(testExtractURIResult); CPPUNIT_TEST(testGetRequest); @@ -25,7 +24,6 @@ class FileEntryTest : public CppUnit::TestFixture { public: void setUp() {} - void testSetupDir(); void testRemoveURIWhoseHostnameIs(); void testExtractURIResult(); void testGetRequest(); @@ -53,23 +51,6 @@ SharedHandle createFileEntry() } } // namespace -void FileEntryTest::testSetupDir() -{ - std::string dir = "./aria2-FileEntryTest-testSetupDir"; - std::string filename = "filename"; - std::string path = dir+"/"+filename; - File d(dir); - if(d.exists()) { - CPPUNIT_ASSERT(d.remove()); - } - CPPUNIT_ASSERT(!d.exists()); - FileEntry fileEntry(path, 0, 0); - fileEntry.setupDir(); - CPPUNIT_ASSERT(d.isDir()); - File f(path); - CPPUNIT_ASSERT(!f.exists()); -} - void FileEntryTest::testRemoveURIWhoseHostnameIs() { SharedHandle fileEntry = createFileEntry();