20 #ifndef ISO9660FILESYSTEM_H 21 #define ISO9660FILESYSTEM_H 24 #include "modules/system/vfs/Filesystem.h" 25 #include "pedigree/kernel/processor/types.h" 26 #include "pedigree/kernel/time/Time.h" 27 #include "pedigree/kernel/utilities/String.h" 65 virtual bool remove(
File *parent,
File *file);
67 virtual Disk *getDisk()
75 inline bool isLeap(uint32_t year)
79 else if (year % 100 == 0)
81 else if (year % 4 == 0)
89 Time::Timestamp ret = 0;
92 ret += time.Minute * 60;
93 ret += time.Hour * 60 * 60;
94 ret += (time.Day - 1) * 24 * 60 * 60;
96 static uint16_t cumulativeDays[] = {0, 31, 59, 90, 120, 151, 181,
97 212, 243, 273, 304, 334, 365};
98 ret += cumulativeDays[time.Month - 1] * 24 * 60 * 60;
100 uint32_t year = time.Year + 1900;
101 if ((time.Month) > 2 && isLeap(year))
105 uint32_t realYear = year;
107 ((realYear / 4) - (realYear / 100) + (realYear / 400));
108 leapDays -= ((1970 / 4) - (1970 / 100) + (1970 / 400));
110 ret += leapDays * 24 * 60 * 60;
111 ret += (year - 1970) * 365 * 24 * 60 * 60;
116 File *fileFromDirRecord(
118 bool bDirectory =
false);
137 size_t m_BlockNumber;
virtual bool createSymlink(File *parent, const String &filename, const String &value)
virtual bool createDirectory(File *parent, const String &filename, uint32_t mask)
virtual String getVolumeLabel() const
virtual size_t getBlockSize() const
virtual bool initialise(Disk *pDisk)
virtual bool createFile(File *parent, const String &filename, uint32_t mask)
Iso9660VolumeDescriptorPrimary m_PrimaryVolDesc
virtual File * getRoot() const
virtual uintptr_t readBlock(uint64_t location)