diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-06 04:38:54 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-07-06 04:38:54 +0000 |
| commit | cfa808126b37d24944bc817972079b333c4cf8a1 (patch) | |
| tree | df7bb40b5ebc31f7f0cbaae3340b15a121e02240 /src/File.cc | |
| parent | 46f081f1dbf66e8b40a4412c6cc4f41c8aa40d20 (diff) | |
2008-07-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Introduced a2_struct_stat. It is defined as `struct _stati64' if
__MINGW32__ is defined, because under MinGW32, _stati64 is used
and its
second argument is of type `struct _stati64'. Otherwise it is
defined as
`struct stat'.
* src/AbstractDiskWriter.cc
* src/File.cc
* src/File.h
* src/a2io.h
Diffstat (limited to 'src/File.cc')
| -rw-r--r-- | src/File.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/File.cc b/src/File.cc index 9bc57bf2..ed41b450 100644 --- a/src/File.cc +++ b/src/File.cc @@ -50,17 +50,17 @@ File::File(const std::string& name):name(name) {} File::~File() {} -int File::fillStat(struct stat& fstat) { +int File::fillStat(a2_struct_stat& fstat) { return stat(name.c_str(), &fstat); } bool File::exists() { - struct stat fstat; + a2_struct_stat fstat; return fillStat(fstat) == 0; } bool File::isFile() { - struct stat fstat; + a2_struct_stat fstat; if(fillStat(fstat) < 0) { return false; } @@ -68,7 +68,7 @@ bool File::isFile() { } bool File::isDir() { - struct stat fstat; + a2_struct_stat fstat; if(fillStat(fstat) < 0) { return false; } @@ -86,7 +86,7 @@ bool File::remove() { } uint64_t File::size() { - struct stat fstat; + a2_struct_stat fstat; if(fillStat(fstat) < 0) { return 0; } @@ -122,7 +122,7 @@ bool File::mkdirs() { mode_t File::mode() { - struct stat fstat; + a2_struct_stat fstat; if(fillStat(fstat) < 0) { return 0; } |
