ThingWorx C SDK
Macros
File Transfer Support Macros

Macros

#define TW_ADD_FILE_TRANSFER_SHAPE()   twFileManager_Create()
 Adds all services required for the current Thing to support File Transfers. Should be called once before using TW_SHARE_DIRECTORY(). More...
 
#define TW_SHARE_DIRECTORY(alias, path)   twFileManager_AddVirtualDir(_tw_thing_name, alias, path)
 Shares a directory on disk from within your application. Must be called after TW_ADD_FILE_TRANSFER_SHAPE(). Shared directories must exist before this macro is called. More...
 

Detailed Description

Macro Definition Documentation

#define TW_ADD_FILE_TRANSFER_SHAPE ( )    twFileManager_Create()

Adds all services required for the current Thing to support File Transfers. Should be called once before using TW_SHARE_DIRECTORY().

Returns
returns no value
#define TW_SHARE_DIRECTORY (   alias,
  path 
)    twFileManager_AddVirtualDir(_tw_thing_name, alias, path)

Shares a directory on disk from within your application. Must be called after TW_ADD_FILE_TRANSFER_SHAPE(). Shared directories must exist before this macro is called.

Parameters
aliasconst char* [in] a Name of a virtual directory to be created off of your virtual root "/". Example: An alias of shared would appear as a virtual directory "/shared".
pathconst char* [in] A full path to the local directory you indend to share the contents of.
Returns
returns TW_OK on success. Returns {TW_FILE_XFER_MANAGER_NOT_INITIALIZED,TW_ERROR_ALLOCATING_MEMORY} on failure.