|
FireSync API
|
Represents node file services.
This class can be used to work with files and directories on a remote node. Use of the storage module requires that the node has a valid control connection (e.g., after successful kNode_Connect). Use of the storage module also requires that the remote node is running FireSync 6+ firmware; if these minimum conditions are met, storage functionality should be available.
All methods accept relative or absolute paths. When using methods such as kStorage_ListFiles that expect a path to a directory, "." can be used to refer to the current working directory. By default, the currrent working directory is set to "/user", which corresponds to the standard non-volatile storage location for application data files.
Though the methods provided by this class allow for directories to be created or destroyed, this feature isn't necessarily supported in all remote directories. For example, as of mid-2013, DM647-based sensors support the creation/deletion of directories only within the "/temp" folder (volatile, DDR2-based storage).

Public Member Functions | |
| kStatus | kStorage_Copy (kStorage storage, const kChar *sourcePath, const kChar *destPath, kCallbackFx progress, kPointer context) |
| Copies a file from one location to another within sensor storage. More... | |
| kStatus | kStorage_CreateDirectory (kStorage storage, const kChar *directory) |
| Creates a directory at the specified location. More... | |
| kStatus | kStorage_Delete (kStorage storage, const kChar *filePath) |
| Deletes the specified file. More... | |
| kStatus | kStorage_DeleteDirectory (kStorage storage, const kChar *directory) |
| Deletes the specified directory, including all of its contents. More... | |
| kStatus | kStorage_DownloadToBuffer (kStorage storage, const kChar *filePath, void *buffer, kSize capacity, kCallbackFx progress, kPointer context) |
| Reads the contents of a storage file into a memory buffer. More... | |
| kStatus | kStorage_DownloadToFile (kStorage storage, const kChar *sourcePath, const kChar *destPath, kCallbackFx progress, kPointer context) |
| Copies a file from node storage to the specified local destination. More... | |
| kStatus | kStorage_DownloadToStream (kStorage storage, const kChar *filePath, kStream stream, kCallbackFx progress, kPointer context) |
| Reads the contents of a storage file into a local stream. More... | |
| kBool | kStorage_FileExists (kStorage storage, const kChar *filePath) |
| Checks that the specified file exists. More... | |
| kSize | kStorage_FileSize (kStorage storage, const kChar *filePath) |
| Gets the size of the specified file. More... | |
| kStatus | kStorage_ListDirectories (kStorage storage, const kChar *directory, kArrayList directories) |
| Lists the sub-directories in the specified directory. More... | |
| kStatus | kStorage_ListEntries (kStorage storage, const kChar *directory, kArrayList entries) |
| Lists the file system entries in the specified directory. More... | |
| kStatus | kStorage_ListEntriesEx (kStorage storage, const kChar *directory, kArrayList entries) |
| Retrieves information about each file system entry within the specified directory. More... | |
| kStatus | kStorage_ListFiles (kStorage storage, const kChar *directory, kArrayList files) |
| Lists the files in the specified directory. More... | |
| kStatus | kStorage_SystemDirectory (kStorage storage, kChar *directory, kSize capacity) |
| Gets the directory used for executables and system configuration files. More... | |
| kStatus | kStorage_TempDirectory (kStorage storage, kChar *directory, kSize capacity) |
| Gets the directory that should be used for temporary files. More... | |
| kStatus | kStorage_UploadFromBuffer (kStorage storage, const kChar *filePath, const void *buffer, kSize size, kCallbackFx progress, kPointer context) |
| Write the contents of a memory buffer to a storage module file. More... | |
| kStatus | kStorage_UploadFromFile (kStorage storage, const kChar *sourcePath, const kChar *destPath, kCallbackFx progress, kPointer context) |
| Copies the specified local file into node storage. More... | |
| kStatus | kStorage_UploadFromStream (kStorage storage, const kChar *filePath, kStream stream, kSize size, kCallbackFx progress, kPointer context) |
| Write the contents of a local stream to a storage file, with progress updates. More... | |
| kStatus | kStorage_UserDirectory (kStorage storage, kChar *directory, kSize capacity) |
| Gets the directory that should be used for application configuration/resource files. More... | |
| kStatus | kStorage_Wipe (kStorage storage) |
| Deletes all user and temp files. More... | |