53 uintptr_t readBlock(
File* pFile, uint64_t location);
54 size_t getBlockSize() {
63 virtual Disk* getDisk() {
71 bool readSector(uint64_t location,
void* destination);
73 inline bool isLeap(uint32_t year) {
76 else if (year % 100 == 0)
78 else if (year % 4 == 0)
85 Time::Timestamp ret = 0;
88 ret += time.Minute * 60;
89 ret += time.Hour * 60 * 60;
90 ret += (time.Day - 1) * 24 * 60 * 60;
92 static uint16_t cumulativeDays[] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365};
93 ret += cumulativeDays[time.Month - 1] * 24 * 60 * 60;
95 uint32_t year = time.Year + 1900;
96 if ((time.Month) > 2 && isLeap(year))
100 uint32_t realYear = year;
101 uint32_t leapDays = ((realYear / 4) - (realYear / 100) + (realYear / 400));
102 leapDays -= ((1970 / 4) - (1970 / 100) + (1970 / 400));
104 ret += leapDays * 24 * 60 * 60;
105 ret += (year - 1970) * 365 * 24 * 60 * 60;
111 bool bDirectory =
false);
130 size_t m_BlockNumber;