PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Operating mode
  • Limitation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
OBEXListFile (Function)
In French: OBEXListeFichier
Lists the files shared by a device that is using the OBEX protocol.
Note: This function cannot be used if the transfer is performed by infrared.
Example
sMACAddress is string
// Retrieve the MAC address of Bluetooth device
// The address is stored in a table column
sMACAddress = TABLE_Devices.COL_MACAddr[TABLE_Devices]
// OBEX connection
EDT_OBEXID = OBEXConnect(obexBluetooth, sMACAddress)
...
// Retrieve the simple list of shared files
FileList is string = OBEXListFile(EDT_OBEXID)
Syntax
<Result> = OBEXListFile(<Identifier of OBEX Connection> [, <Home Directory> [, <Level of Details>]])
<Result>: Character string
List of directory files:
  • in simple mode: list in the following format:
    <Name of file 1> + TAB + <Type 1> + CR + ... <Name of file N> + TAB + <Type N>
    where <Type> corresponds to "F" if the element is a file and to "D" if the element is a directory.
  • in detailed mode: list in the following format:
    <Name of File 1> + TAB + <Type 1> + TAB + <Size in Bytes 1> + TAB + <Rights 1> + TAB + <Modification Date 1> + TAB + <Creation Date 1> + TAB + <Access Date 1> + CR + ...
    where <Type> corresponds to "F" if the element is a file and to "D" if the element is a directory,
    <Rights> is a string that can contain the letters "R" (read rights), "W" (write rights) and "D" (erase rights).
    The dates are in "YYYYMMDDHHMMSS" format.
If the obexListDirectory constant is used, these lists will also contain the sub-directories. This list may possibly contain a ".." directory if the root of the tree structure of the OBEX server is not listed.
<Identifier of OBEX Connection>: Integer
Identifier of OBEX connection to use. This identifier is returned by OBEXConnect.
<Home Directory>: Optional character string (with quotes)
Name of directory to list. The transfer directory is used if this parameter is not specified.
<Level of Details>: Optional Integer constant (or combination of constants)
Level of result details:
obexListDetailed<Result> contains the list of files in detailed mode.
obexListDirectory<Result> contains the list of files and directories. This constant can be combined with obexListSimple and obexListDetailed. When it is used on its own, it is equivalent to obexListSimple + obexListDirectory.
obexListSimple
(Default value)
<Result> contains the list of files in simple mode.
Remarks

Operating mode

The name of the directory to list is not always known. A first call to OBEXListFile (without directory name) is used to list the root of OBEX tree structure. If the mobile devices supports the creation of sub-directories, you will have the ability to call OBEXListFile by specifying the name of a sub-directory.

Limitation

Only the Microsoft bluetooth stacks are supported by this function. To find out the stack used, call BTStack.
See Which stacks to use? for more details
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment