Folder

The folder service is for listing, creating and alteration of folders.


Deprecated

To navigate the tree structure use tree.fetchNode

fetchAll

array folder.fetchAll( integer|null $parentId )

Lists all the folders owned by the logged in customer. If the parent is not specified or null then it will return all root folders for the system. If a parent is provided then all folders relating to that parent will be returned.

Return Values

Returns an indexed array of folders. See #find



find

array folder.find( int folderId )

Details the folder specified.

Parameters

folderId

ID of the folder you're requesting.

Return Values

Returns an associative array. The possible returned elements are as follows:

Name

Type

Description

folder_id

int

folder's unique system identifier

parent_id

int/null

folder identifier associated as the parent

name

string

folder name



insert

int folder.insert( array data )

Create a new folder.

Parameters

data

Name

Required

Type

Description

parent_id

yes

int

identifier of the parent folder

name

yes

string

name of the new folder

Return Values

Returns an int type. The id of the newly created folder.



update

bool folder.update( int folderId, array data )

Updates an existing folder.

Parameters

folderId

Identifier of the folder to be updated.

data

See #insert

Return Values

Returns a boolean. True on success.



delete

bool folder.delete( int folderId )

Deletes the specified folder id.

Parameters

folderId

ID of the folder to be deleted.

Return Values

Returns a boolean. True on success.

Service

folder

Methods