Ejemplo n.º 1
0
        public ISO9660Directory(ISO9660FileSystem fileSystem, ISO9660Directory parent, Disk.ISO9660.DirectoryRecord record)
            : base(fileSystem, parent, record.FileIdentifier.length > 0 ? (FOS_System.String)record.FileIdentifier.Split(';')[0] : "")
        {
            TheDirectoryRecord = record;

            _theFile = new ISO9660File(fileSystem, parent, record) { IsDirectoryFile = true };
        }
Ejemplo n.º 2
0
        public ISO9660Directory(ISO9660FileSystem fileSystem, ISO9660Directory parent, Disk.ISO9660.DirectoryRecord record)
            : base(fileSystem, parent, record.FileIdentifier.length > 0 ? (FOS_System.String)record.FileIdentifier.Split(';')[0] : "")
        {
            TheDirectoryRecord = record;

            _theFile = new ISO9660File(fileSystem, parent, record)
            {
                IsDirectoryFile = true
            };
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes all available partitions looking for valid
        /// file systems.
        /// </summary>
        public static void InitPartitions()
        {
            for (int i = 0; i < Partitions.Count; i++)
            {
                try
                {
                    Partition aPartition = (Partition)Partitions[i];
                    if (!aPartition.Mapped)
                    {
                        //BasicConsole.WriteLine("Attempting to create FAT File System...");
                        FileSystem newFS = null;
                        if (aPartition is Disk.ISO9660.PrimaryVolumeDescriptor)
                        {
                            newFS = new ISO9660.ISO9660FileSystem((Disk.ISO9660.PrimaryVolumeDescriptor)aPartition);
                        }
                        else
                        {
                            newFS = new FOS_System.IO.FAT.FATFileSystem(aPartition);
                        }

                        if (newFS.IsValid)
                        {
                            FOS_System.String mappingPrefix = FOS_System.String.New(3);
                            mappingPrefix[0] = (char)((int)('A') + i);
                            mappingPrefix[1] = ':';
                            mappingPrefix[2] = PathDelimiter;
                            newFS.TheMapping = new FileSystemMapping(mappingPrefix, newFS);
                            FileSystemMappings.Add(newFS.TheMapping);
                            aPartition.Mapped = true;
                        }
                        //else
                        //{
                        //    BasicConsole.WriteLine("Partition not formatted as valid FAT file-system.");
                        //}
                    }
                }
                catch
                {
                    BasicConsole.Write("Error initialising partition: ");
                    BasicConsole.WriteLine(i);
                    BasicConsole.WriteLine(ExceptionMethods.CurrentException.Message);
                    //BasicConsole.DelayOutput(20);
                }
            }
        }
Ejemplo n.º 4
0
 public ISO9660File(ISO9660FileSystem fileSystem, ISO9660Directory parent, Disk.ISO9660.DirectoryRecord record)
     : base(fileSystem, parent, record.FileIdentifier.length > 0 ? (FOS_System.String)record.FileIdentifier.Split(';')[0] : "", record.DataLength)
 {
     TheDirectoryRecord = record;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes all available partitions looking for valid 
        /// file systems.
        /// </summary>
        public static void InitPartitions()
        {
            for (int i = 0; i < Partitions.Count; i++)
            {
                try
                {
                    Partition aPartition = (Partition)Partitions[i];
                    if (!aPartition.Mapped)
                    {
                        //BasicConsole.WriteLine("Attempting to create FAT File System...");
                        FileSystem newFS = null;
                        if (aPartition is Disk.ISO9660.PrimaryVolumeDescriptor)
                        {
                            newFS = new ISO9660.ISO9660FileSystem((Disk.ISO9660.PrimaryVolumeDescriptor)aPartition);
                        }
                        else
                        {
                            newFS = new FOS_System.IO.FAT.FATFileSystem(aPartition);
                        }

                        if (newFS.IsValid)
                        {
                            FOS_System.String mappingPrefix = FOS_System.String.New(3);
                            mappingPrefix[0] = (char)((int)('A') + i);
                            mappingPrefix[1] = ':';
                            mappingPrefix[2] = PathDelimiter;
                            newFS.TheMapping = new FileSystemMapping(mappingPrefix, newFS);
                            FileSystemMappings.Add(newFS.TheMapping);
                            aPartition.Mapped = true;
                        }
                        //else
                        //{
                        //    BasicConsole.WriteLine("Partition not formatted as valid FAT file-system.");
                        //}
                    }
                }
                catch
                {
                    BasicConsole.Write("Error initialising partition: ");
                    BasicConsole.WriteLine(i);
                    BasicConsole.WriteLine(ExceptionMethods.CurrentException.Message);
                    //BasicConsole.DelayOutput(20);
                }
            }
        }
Ejemplo n.º 6
0
 public ISO9660File(ISO9660FileSystem fileSystem, ISO9660Directory parent, Disk.ISO9660.DirectoryRecord record)
     : base(fileSystem, parent, record.FileIdentifier.length > 0 ? (FOS_System.String)record.FileIdentifier.Split(';')[0] : "", record.DataLength)
 {
     TheDirectoryRecord = record;
 }