Changeset 16 for trunk/UPhysDrive.pas


Ignore:
Timestamp:
Apr 2, 2016, 8:18:30 PM (8 years ago)
Author:
chronos
Message:
  • Added: Ability to add and remove scan operation.
  • Modified: XMLConfig moved from TMainForm to TCore as more proper place for general object.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UPhysDrive.pas

    r13 r16  
    99
    1010type
     11  TDriveKind = (dkPhysical, dkFile);
    1112
    1213  { TDriveInfo }
    1314
    1415  TDriveInfo = class
     16    Kind: TDriveKind;
    1517    Model: string;
    1618    Size: Int64;
     
    9799    if FileExists(List[I] + '/device') then begin
    98100      NewDriveInfo := TDriveInfo.Create;
     101      NewDriveInfo.Kind := dkPhysical;
    99102      NewDriveInfo.Model := Trim(LoadFileToStr(List[I] + '/device/model'));
    100103      NewDriveInfo.SectorSize := StrToInt(Trim(LoadFileToStr(List[I] + '/queue/physical_block_size')));
     
    106109  end;
    107110  {$ENDIF}
     111{  NewDriveInfo := TDriveInfo.Create;
     112  NewDriveInfo.Kind := dkFile;
     113  NewDriveInfo.Model := 'File';
     114  NewDriveInfo.SectorSize := 4096;
     115  NewDriveInfo.SectorCount := 0;
     116  NewDriveInfo.Size := 0;
     117  NewDriveInfo.Path := '';
     118  Add(NewDriveInfo);
     119  }
    108120end;
    109121
Note: See TracChangeset for help on using the changeset viewer.