ImageEn, unit iexWPD

TIEPortableDevices.NavigateToFolderPath

TIEPortableDevices.NavigateToFolderPath


Declaration

function NavigateToFolderPath(const sPath : WideString; bIncludeSubFolders : Boolean = False; GetTypes: TIEWPDObjectTypes = [iewFile, iewFolder]) : Boolean; overload;
function NavigateToFolderPath(const sDeviceID, sPath : WideString; bIncludeSubFolders : Boolean = False; GetTypes: TIEWPDObjectTypes = [iewFile, iewFolder]) : Boolean; overload;


Description

Navigates to a device folder specified by a path and fills the objects list. A path is a list of folders specified by their FriendlyName and delimited by a slash. e.g. Card\DCIM\ for the image folder on a smartphone.

Parameter Description
sDeviceID The device to open (if not specified then the active device is used). A friendly name can also be specified
sPath The path to open on that device. Optionally, it can include the device ID to open a folder on a specific device
bIncludeSubFolders Whether to also retrieve objects in sub-folders
GetTypes The type of objects to returns, files (iewFile), folders (iewFolder) or both

Result is false if an error was detected. You can check LastError for detail on the failure.


Examples

// Add all files in the DCIM folder and its sub-folders
if fPortableDevices.NavigateToFolderPath( 'Card\DCIM\', True, iewFile ) then
begin
  lbxObjects.Items.Clear;
  for I := 0 to fPortableDevices.ObjectCount - 1 do
    lbxObjects.Items.Add( fPortableDevices.Objects[ I ].ID );
end;

fPortableDevices.NavigateToFolderPath( 'WPD:GM2913\Internal shared storage\DCIM', True, iewFile );