Exemple #1
0
 /// <summary>
 /// Read a FATX Image
 /// </summary>
 /// <param name="xImage"></param>
 internal FATXDrive(DJsIO xImage)
 {
     if (xImage == null || !xImage.Accessed)
     {
         return;
     }
     if (!FATXManagement.IsFATX(ref xImage, out xType))
     {
         throw new Exception("Drive is not FATX");
     }
     xIO = xImage;
     LoadPartitions();
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new FATX Drive Class from an already set Drive
 /// </summary>
 /// <param name="InDrive"></param>
 public FATXDrive(ref Drive InDrive)
 {
     if (!InDrive.Accessed)
     {
         throw new Exception("Invalid input");
     }
     if (!FATXManagement.IsFATX(ref InDrive, out xType))
     {
         throw new Exception("Drive is not FATX");
     }
     xactive = true;
     xDrive  = InDrive;
     LoadPartitions();
 }
Exemple #3
0
        /// <summary>
        /// Load FATX from an Image
        /// </summary>
        /// <param name="FileLocale"></param>
        public FATXDrive(string FileLocale)
        {
            DJsIO xImage = new DJsIO(FileLocale, DJFileMode.Open, true);

            if (xImage == null || !xImage.Accessed)
            {
                return;
            }
            if (!FATXManagement.IsFATX(ref xImage, out xType))
            {
                throw new Exception("Drive is not FATX");
            }
            xactive = true;
            xIO     = xImage;
            LoadPartitions();
        }
Exemple #4
0
        /// <summary>
        /// Sets a FATX Drive from an index
        /// </summary>
        /// <param name="DeviceIn"></param>
        public FATXDrive(DeviceReturn DeviceIn)
        {
            Drive xdrive = new Drive(DeviceIn.index, DeviceIn.type);

            if (!xdrive.Accessed)
            {
                throw new Exception("Invalid input");
            }
            if (!FATXManagement.IsFATX(ref xdrive, out xType))
            {
                throw new Exception("Drive is not FATX");
            }
            xactive = true;
            xDrive  = xdrive;
            LoadPartitions();
        }