1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
// fgfileinfo.cc
#include "fgfileinfo.h"
FGFileInfo::FGFileInfo(const FGString& filename)
: mFileName(filename), mSize(-1), mIsDir(false), mIsRegularFile(true)
{
}
FGFileInfo::FGFileInfo(const FGString& filename, int size,
bool isDir, bool isFile)
: mFileName(filename), mSize(size), mIsDir(isDir), mIsRegularFile(isFile)
{
}
FGFileInfo::FGFileInfo()
: mSize(-1), mIsDir(false), mIsRegularFile(true)
{
}
bool
FGFileInfo::operator==(const FGFileInfo& other) const
{
return (mFileName == other.mFileName &&
mIsRegularFile == other.mIsRegularFile);
}
const FGString&
FGFileInfo::GetFileName(void) const
{
return mFileName;
}
bool
FGFileInfo::IsRegularFile(void) const
{
return mIsRegularFile;
}
int
FGFileInfo::GetSize(void) const
{
return mSize;
}
|