int ctMemphisGetFiles( pRCESJson request, ppRCESJson result )
Description:
Filesystem getfiles request parameter list in JSON format. It will have the connection pool name and the search criteria, which must be either of the following:
It will also have the number of files to be retrieved.
HTTP URL: <baseURL>/ctMemphisGetFiles/
HTTP Verb: POST
Parameters:
{
"volume": 1, // optional, if not passed, "database" must be passed
"recursive": true, // optional, default is false,
see Note 2 - Recursive File System
"refresh": false, // optional, default is false, if true executes
the FileSystem scan before returning it
"physicalCheck": false, // optional, default is false, if true and
"refresh" is also true, before returning the
list of files found, double check if they
physically exist, if they don't, remove them
from FileTable (in case it is not in use to
any replication)
"ctreeOnly": true, // optional, default is false, if true, it will
scan only c‑tree data files. Used only in
case of "refresh" as true
"paging": true, // optional, see Note 1 - Paging Parameters
"limit": 100, // optional, see Note 1 - Paging Parameters
"start": 200 // optional, see Note 1 - Paging Parameters
}
or
{
"volume": 1, // optional, if not passed, "database" must be passed
"path": "FairCom", // optional, if not passed, it will return all
the files from the volume
"mask": "*", // optional, if not passed, it will be assumed "*"
"recursive": false, // optional, default is false, see
Note 2 - Recursive File System
"refresh": false, // optional, default is false, if true executes
the FileSystem scan before returning it
"physicalCheck": false, // optional, default is false, if true and
"refresh" is also true, before returning the
list of files found, double check if they
physically exist, if they don't, remove them
from FileTable (in case it is not in use to
any replication)
"ctreeOnly": true, // optional, default is false, if true, it will
scan only c‑tree data files. Used only in
case of "refresh" as true
"paging": true, // optional, see Note 1 - Paging Parameters
"limit": 100, // optional, see Note 1 - Paging Parameters
"start": 200 // optional, see Note 1 - Paging Parameters
}
or
{
"database": 1, // optional, if not passed, it will assume it is not
retrieving files by database, will use one of the previous
options, in this case volume is required
"paging": true, // optional, see Note 1 - Paging Parameters
"limit": 100, // optional, see Note 1 - Paging Parameters
"start": 200 // optional, see Note 1 - Paging Parameters
}
The following options are for uniquely retrieving a specific file:
{
"id": 243 // optional, if passed, search File by its identification
}
or
{
"volume": 1, // optional, if passed with path and name,
search File by its name
"path": "FairCom", // optional, if passed with volume and name,
search File by its name
"name": "data" // optional, if passed with volume and path,
search File by its name
}
The FileTable is a tree of files. It is formed by levels of directories and their file lists. So, we have two options for retrieving a list of files:
a) looking at a specific directory (recursive is FALSE);
b) recursively looking into all the sub directories from a given root directory (recursive is TRUE).
If volume is not provided, or -1 is passed, we assume it recursive by default
{
"fileList": [
{
"id": 0,
"volume": 1,
"path": "FairCom\\V10.1.3\\winX64\\bin\\ace\\sql\\data\\ctreeSQL.dbs",
"name": "test.dat",
"table": "test",
"size": 11736,
"createTime": "2014-04-07T13:18:09",
"updateTime": "2014-04-07T14:16:39",
"isDir": 0,
"isPartitioned": false,
"type": 6,
"database": 1,
"isReplicable": false,
"isCtree": true,
"description": "File is pending on the schema checked - probably
due to permission issue"
},
{
"id": 2,
"volume": 1,
"path": "FairCom\\V10.1.3\\winX64\\bin\\ace\\sql\\data\\ctreeSQL.dbs",
"name": "test2.dat",
"table": "test2",
"size": 125533,
"createTime": "2014-04-07T13:18:09",
"updateTime": "2014-04-07T14:16:39",
"isDir": 0,
"isPartitioned": false,
"type": 5,
"database": 1,
"isReplicable": false,
"isCtree": true,
"description": "File is c-tree but doesn't have an index that
qualifies for replication"
}
]
"success": true,
"error":
{
"errorCode": 0,
"message": "Success"
},
"total": 500 // total number of files for the query -
see Note 1 - Paging Parameters
}
Return:
Error code