diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
| commit | 048a2cf59737f761876e81a77e8d064c45c752d7 (patch) | |
| tree | 65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /src/FileEntry.cc | |
| parent | e26bbbb9eee140ba24402fe872a752b42f0077de (diff) | |
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
I've rewritten lots of files and now some headers have forward
class declarations to reduce compile time.
The implementation is extremely alpha stage, I recommend to use this
for testing purpose only.
Diffstat (limited to 'src/FileEntry.cc')
| -rw-r--r-- | src/FileEntry.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/FileEntry.cc b/src/FileEntry.cc index d0c72de0..548f1123 100644 --- a/src/FileEntry.cc +++ b/src/FileEntry.cc @@ -45,7 +45,8 @@ FileEntry::FileEntry(const string& path, FileEntry::~FileEntry() {} -void FileEntry::setupDir(const string& parentDir) { +void FileEntry::setupDir(const string& parentDir) +{ string absPath = parentDir+"/"+path; char* temp = strdup(absPath.c_str()); string dir = string(dirname(temp)); @@ -62,3 +63,15 @@ void FileEntry::setupDir(const string& parentDir) { throw new DlAbortEx("Failed to create directory %s.", dir.c_str()); } } + +FileEntry& FileEntry::operator=(const FileEntry& entry) +{ + if(this != &entry) { + path = entry.path; + length = entry.length; + offset = entry.offset; + extracted = entry.extracted; + requested = entry.requested; + } + return *this; +} |
