GetFileInfoSimple
Returns information on a file using path and name.
Service | Operation |
---|---|
groupFile | GET_FILE_INFO_SIMPLE |
Method Parameters
Parameter | Description |
---|---|
groupId | The id of the group. |
folderPath | The folder path. |
filename | The file name. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string groupId = "dfsfsffsd";
string folderPath = "";
string filename = "cccc";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.GroupFileService.GetFileInfoSimple(groupId, folderPath, filename, successCallback, failureCallback);
const char *groupId = "dfsfsffsd";
const char *folderPath = "";
const char *filename = "cccc";
_bc->getGroupFileService()->getFileInfoSimple(groupId, folderPath, filename, this);
NSString *groupId = @"dfsfsffsd";
NSString *folderPath = @"";
NSString *filename = @"cccc";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc groupFileService] getFileInfoSimple:groupId
folderPath:folderPath
filename:filename
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String groupId = "dfsfsffsd";
String folderPath = "";
String filename = "cccc";
this; // implements IServerCallback
_bc.getGroupFileService().getFileInfoSimple(groupId, folderPath, filename, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var groupId = "dfsfsffsd";
var folderPath = "";
var filename = "cccc";
_bc.groupFile.getFileInfoSimple(groupId, folderPath, filename, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var groupId = "dfsfsffsd";
var folderPath = "";
var filename = "cccc";
ServerResponse result = await _bc.groupFileService.getFileInfoSimple(groupId:groupId, folderPath:folderPath, filename:filename);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var groupId = "dfsfsffsd";
var folderPath = "";
var filename = "cccc";
var groupFileProxy = bridge.getGroupFileServiceProxy();
var postResult = groupFileProxy.getFileInfoSimple(groupId, folderPath, filename);
if (postResult.status == 200) {
// Success!
}
{
"service": "groupFile",
"operation": "GET_FILE_INFO_SIMPLE",
"data":
{
"groupId": "dfsfsffsd",
"folderPath": "",
"filename": "cccc"
}
}
JSON Response
{
"data": {
"fileDetails": {
"treeId": "d9e937cc-750f-4414-962c-838f1af3f34a",
"fileName": "glog.json",
"fileSize": 7051,
"dateUploaded": 1677183768000,
"etag": "08c580b36ee79773bfec4a3c51bd1b64",
"acl": {
"member": 2,
"other": 0
},
"version": 1,
"url": "https://api.internal.braincloudservers.com/groupfiles/bc/g/23782/gr/2bf538d1-19ea-4e14-9862-f979215e09b7/d9e937cc-750f-4414-962c-838f1af3f34a/6d938c22-3b8c-4b99-a913-2edafed71a83/V1/glog.json",
"fileId": "6d938c22-3b8c-4b99-a913-2edafed71a83"
},
"groupId": "2bf538d1-19ea-4e14-9862-f979215e09b7"
},
"status": 200
}