Exemple #1
0
        public void BuildSectorMap()
        {
            switch (dosFormat)
            {
            case OricDisk.DOSFormats.OricDOS:
            {
                OricDos oricDisc = new OricDos();
                oricDisc.GetDiskInfo(fullName);

                diskSectorMap = oricDisc.BuildSectorMap(fullName);
            }
            break;

            case OricDisk.DOSFormats.SedOric:
            {
                SedOric oricDisc = new SedOric();
                oricDisc.GetDiskInfo(fullName);

                diskSectorMap = oricDisc.BuildSectorMap(fullName);
            }
            break;

            case OricDisk.DOSFormats.StratSed:
            {
                StratSed oricDisc = new StratSed();
                oricDisc.GetDiskInfo(fullName);

                diskSectorMap = oricDisc.BuildSectorMap(fullName);
            }
            break;

            case OricDisk.DOSFormats.TDOS:
            {
                FTDos oricDisc = new FTDos();
                oricDisc.GetDiskInfo(fullName);

                diskSectorMap = oricDisc.BuildSectorMap(fullName);
            }
            break;

            default:
                break;
            }
        }
Exemple #2
0
        public OricDiskInfo(String diskPathName)
        {
            fullName = diskPathName;

            oricDisk = new OricDisk();
            oricDisk.LoadDisk(fullName);

            dosFormat  = oricDisk.DOSFormat();
            dosVersion = oricDisk.DOSVersion();

            switch (dosFormat)
            {
            case OricDisk.DOSFormats.OricDOS:
            {
                OricDos oricDisc = new OricDos();
                oricDisc.GetDiskInfo(fullName);

                nextAvailableSector = (ushort)oricDisc.nextAvailableSector;
                nextAvailableTrack  = (ushort)oricDisc.nextAvailableTrack;

                diskName = oricDisc.diskName;
                diskType = oricDisc.diskType;

                sectors     = oricDisc.sectors;
                freeSectors = oricDisc.sectorsFree;
                usedSectors = oricDisc.sectorsUsed;

                noOfSides       = oricDisc.sides;
                tracksPerSide   = oricDisc.tracksPerSide;
                sectorsPerTrack = oricDisc.sectorsPerTrack;

                fileCount = oricDisc.fileCount;
            }
            break;

            case OricDisk.DOSFormats.SedOric:
            {
                SedOric oricDisc = new SedOric();
                oricDisc.GetDiskInfo(fullName);

                diskName = oricDisc.diskName;
                diskType = oricDisc.diskType;

                sectors     = oricDisc.sectors;
                freeSectors = oricDisc.sectorsFree;
                usedSectors = oricDisc.sectorsUsed;

                noOfSides       = oricDisc.sides;
                tracksPerSide   = oricDisc.tracksPerSide;
                sectorsPerTrack = oricDisc.sectorsPerTrack;

                fileCount = oricDisc.noOfFiles;
            }
            break;

            case OricDisk.DOSFormats.StratSed:
            {
                SedOric oricDisc = new SedOric();
                oricDisc.GetDiskInfo(fullName);

                diskName = oricDisc.diskName;
                diskType = oricDisc.diskType;

                sectors     = oricDisc.sectors;
                freeSectors = oricDisc.sectorsFree;
                usedSectors = oricDisc.sectorsUsed;

                noOfSides       = oricDisc.sides;
                tracksPerSide   = oricDisc.tracksPerSide;
                sectorsPerTrack = oricDisc.sectorsPerTrack;

                fileCount = oricDisc.noOfFiles;
            }
            break;

            case OricDisk.DOSFormats.TDOS:
            {
                FTDos oricDisc = new FTDos();
                oricDisc.GetDiskInfo(fullName);

                diskName = oricDisc.diskName;
                diskType = oricDisc.diskType;

                sectors     = oricDisc.sectors;
                freeSectors = oricDisc.sectorsFree;
                usedSectors = oricDisc.sectorsUsed;

                noOfSides       = oricDisc.sides;
                tracksPerSide   = oricDisc.tracksPerSide;
                sectorsPerTrack = oricDisc.sectorsPerTrack;

                fileCount = oricDisc.noOfFiles;
            }
            break;

            default:
                break;
            }

            creationTime   = File.GetCreationTime(diskPathName);
            lastAccessTime = File.GetLastAccessTime(diskPathName);
            lastWriteTime  = File.GetLastWriteTime(diskPathName);
        }
        public OricDiskInfo(string diskPathName)
        {
            FullName = diskPathName;

            oricDisk = new OricDisk();
            oricDisk.LoadDisk(FullName);

            DOSFormat  = oricDisk.DOSFormat();
            DOSVersion = oricDisk.DOSVersion();

            switch (DOSFormat)
            {
            case OricDisk.DOSFormats.OricDOS:
            {
                OricDos oricDisc = new OricDos();
                oricDisc.GetDiskInfo(FullName);

                nextAvailableSector = (ushort)oricDisc.nextAvailableSector;
                nextAvailableTrack  = (ushort)oricDisc.nextAvailableTrack;

                DiskName = oricDisc.diskName;
                DiskType = oricDisc.diskType;

                Sectors     = oricDisc.sectors;
                SectorsFree = oricDisc.sectorsFree;
                SectorsUsed = oricDisc.sectorsUsed;

                Sides           = oricDisc.sides;
                TracksPerSide   = oricDisc.tracksPerSide;
                SectorsPerTrack = oricDisc.sectorsPerTrack;

                FileCount = oricDisc.fileCount;
            }
            break;

            case OricDisk.DOSFormats.SedOric:
            {
                SedOric oricDisc = new SedOric();
                oricDisc.GetDiskInfo(FullName);

                DiskName = oricDisc.diskName;
                DiskType = oricDisc.diskType;

                Sectors     = oricDisc.sectors;
                SectorsFree = oricDisc.sectorsFree;
                SectorsUsed = oricDisc.sectorsUsed;

                Sides           = oricDisc.sides;
                TracksPerSide   = oricDisc.tracksPerSide;
                SectorsPerTrack = oricDisc.sectorsPerTrack;

                FileCount = oricDisc.noOfFiles;
            }
            break;

            case OricDisk.DOSFormats.StratSed:
            {
                SedOric oricDisc = new SedOric();
                oricDisc.GetDiskInfo(FullName);

                DiskName = oricDisc.diskName;
                DiskType = oricDisc.diskType;

                Sectors     = oricDisc.sectors;
                SectorsFree = oricDisc.sectorsFree;
                SectorsUsed = oricDisc.sectorsUsed;

                Sides           = oricDisc.sides;
                TracksPerSide   = oricDisc.tracksPerSide;
                SectorsPerTrack = oricDisc.sectorsPerTrack;

                FileCount = oricDisc.noOfFiles;
            }
            break;

            case OricDisk.DOSFormats.TDOS:
            {
                FTDos oricDisc = new FTDos();
                oricDisc.GetDiskInfo(FullName);

                DiskName = oricDisc.diskName;
                DiskType = oricDisc.diskType;

                Sectors     = oricDisc.sectors;
                SectorsFree = oricDisc.sectorsFree;
                SectorsUsed = oricDisc.sectorsUsed;

                Sides           = oricDisc.sides;
                TracksPerSide   = oricDisc.tracksPerSide;
                SectorsPerTrack = oricDisc.sectorsPerTrack;

                FileCount = oricDisc.noOfFiles;
            }
            break;

            default:
                break;
            }

            if (this.GetFiles() == null)
            {
                DOSFormat = OricDisk.DOSFormats.Unknown;
            }

            CreationTime   = File.GetCreationTime(diskPathName);
            LastAccessTime = File.GetLastAccessTime(diskPathName);
            LastWriteTime  = File.GetLastWriteTime(diskPathName);
        }