diskinfo

Target computer drive information

Description

example

disk_info = diskinfo(filesys_object, drive_name) returns configuration information for the specified drive on the target computer.

Note: The SimulinkRealTime.fileSystem object will be removed in a future release. See the release note for file system commands to use instead. These commands use the SimulinkRealTime.openFTP function and the functions for the MATLAB ftp object.

Examples

collapse all

Return configuration information for the target computer C:\ drive.

tg = slrt;
filesys_object = SimulinkRealTime.fileSystem(tg);
disk_info = diskinfo(filesys_object,'C:\')
disk_info = 

  struct with fields:

            DriveLetter: 'C'
                  Label: 'FREEDOS'
               Reserved: '   '
           SerialNumber: -857442364
    FirstPhysicalSector: 63
                FATType: 32
               FATCount: 2
          MaxDirEntries: 0
         BytesPerSector: 512
      SectorsPerCluster: 64
          TotalClusters: 1831212
            BadClusters: 0
           FreeClusters: 1827626
                  Files: 932
             FileChains: 936
             FreeChains: 1
       LargestFreeChain: 1827626
              DriveType: DRIVE_FIXED

Input Arguments

collapse all

File system object created by using the SimulinkRealTime.fileSystem creation function.

The file system object represents the target computer file system. You work with the target computer file system from the development computer by using file system methods.

Example: fsys

Data Types: struct

Enclose the drive name in single quotation marks. The drive must exist on the target computer.

Example: 'C:\'

Data Types: char

Output Arguments

collapse all

The disk information includes the drive letter, the internal label of the drive, the drive type, and the serial number of the disk. It also includes technical information about the disk that a technician can use to debug problems with the disk hardware.

Introduced in R2014a