ImageEn, unit iexWPD

TIEPortableDevices.PathToFolderID

TIEPortableDevices.PathToFolderID


Declaration

function PathToFolderID(const sPath : WideString) : WideString; overload;
function PathToFolderID(const sDeviceID, sPath : WideString) : WideString; overload;


Description

Locate a folder by path and returns its ID. 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 check (if not specified then the active device is used)
sPath The path to locate on that device

Result is '' if the path could not be found.


Example

// Return all images in the camera folder of a smart phone
sFolderID := PathToFolderID( 'Card\DCIM\';
if sFolderID <> '' then
  if FindFilesOfType( sFolderID', '*.jpg;*.jpeg' ) then
  begin
    lbxObjects.Items.Clear;
    for I := 0 to fPortableDevices.ObjectCount - 1 do
      lbxObjects.Items.Add( fPortableDevices.Objects[ I ].ID );
  end;