Class Win32_DiskDriveToDiskPartition
java.lang.Object
com.ferrumx.system.associatedclasses.Win32_DiskDriveToDiskPartition
This class relates
Win32_DiskDrive
with
Win32_LogicalDiskToPartition
.
The DeviceID of the Disk Drive queried from
Win32_DiskDrive
is fetched into this
class which then gets all the partition list for the selected Drive. This
list can be then fetched to
Win32_LogicalDiskToPartition.getDriveLetter(String)
to output the
drive letters for the given partitions in a drive
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptiongetPartitionList
(String driveID) Fetches a list of partitions for a particular drive
-
Method Details
-
getPartitionList
public static List<String> getPartitionList(String driveID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException Fetches a list of partitions for a particular drive- Parameters:
driveID
- the DeviceID of the drive that is fetched formWin32_DiskDrive.getDriveID()
- Returns:
- a
List
of partitions for a particular drive - Throws:
IOException
- in case of general I/O errorsIndexOutOfBoundsException
- in case of text parsing issues from powershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-