Overview

ALFileManager manages the user files stored in a shared folder.
Note that FileManager starts to look in the shared folder, and if it does not find anything,
then it looks in the data folder.
Shared folder can be changed on the fly, and module will then be able to say which
files are available in this folder, as well as return their complete path.

Methods

void setUserSharedFolderPath (const string& fileName)

Set a new value of the user shared folder path.

fileName

Name of the module associate to the preference.

string getUserSharedFolderPath ()

Get the current user shared folder path.

Returns

User shared folder path string.

string getSystemSharedFolderPath ()

Get the current system shared folder path.

Returns

System shared folder path string.

bool fileExists (const string& fileName)

Try to find if this file does exist on robot or not.

fileName

Name of the module associate to the preference.

Returns

True upon success

bool dataFileExists (const string& fileName)

Try to find if this file does exist on robot or not.

fileName

Name of the module associate to the preference.

Returns

True upon success

string getFileCompletePath (const string& prefs)

Returns the complete path of the file if it does exist. Starts by looking in user's shared folder, then in system folder.

prefs

array reprenting the whole file.

Returns

True upon success

AL::ALValue getFileContents (const string& prefs)

Returns the complete path of the file if it does exist. Starts by looking in user's shared folder, then in system folder.

prefs

array reprenting the whole file.

Returns

True upon success


Methods inherited from ALModule

void exit ()

Exits and unregisters the module.

string version ()

Returns the version of the module.

Returns

A string containing the version of the module.

bool ping ()

Just a ping. Always returns true

Returns

returns true

vector<string> getMethodList ()

Retrieves the module's method list.

Returns

An array of method names.

AL::ALValue getMethodHelp (const string& methodName)

Retrieves a method's description.

methodName

The name of the method.

Returns

A structure containing the method's description.

AL::ALValue getModuleHelp ()

Retrieves the module's description.

Returns

A structure describing the module.

string getBrokerName ()

Gets the name of the parent broker.

Returns

The name of the parent broker.

string getUsage (const string& name)

Gets the method usage string. This summarise how to use the method.

name

The name of the method.

Returns

A string that summarises the usage of the method.


Copyright © 2010 Aldebaran Robotics - All rights reserved