diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-03-21 14:12:51 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-03-21 14:12:51 +0000 |
| commit | df6c7c03856c9c17e1a48c080aa34d815e812f8e (patch) | |
| tree | 18d81e4a62b0efe64e31640a8284e3fa58b25019 /src/File.cc | |
| parent | a59301bef0af97f654ad5d82070d0045e7da508c (diff) | |
added bittorrent support(experimental)
Diffstat (limited to 'src/File.cc')
| -rw-r--r-- | src/File.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/File.cc b/src/File.cc index e5dc24e2..683fa99a 100644 --- a/src/File.cc +++ b/src/File.cc @@ -62,3 +62,11 @@ bool File::remove() { return false; } } + +long long int File::size() { + struct stat fstat; + if(fillStat(fstat) < 0) { + return 0; + } + return fstat.st_size; +} |
