Only some illustrative code takes a disk partition of the hard disk partition of the system, with API functions: getDriveType [DLLIMPORT ("kernel32.dll", entrypoint = "getDriveType")] public static extern int getDriveType (String nDrive);
Call: String [] DIRS = Environment.getLogicalDrives (); // Get all drives forward (String Dir in DIRS) {? F (getDriveType (DIR) == 3) // Is the hard disk? {??? // Add it to the list? Subdirs) {?? IF (Subdir.attributes.tostring (). Indexof ("Hidden") <0 || Subdir.attributes.tostring (). Indexof ("System") <0)? {?? ...? }