DeleteFiles
This the method available to delete multiple files in BFS. Since the mandatory BrickIds must be supplied in the FileInfoDelete one should always get the information of this via GetFileList.
Filter inputs
Name | Type | Description | Mandatory | Available from version |
---|---|---|---|---|
FileInfoDeletes | The information needed to delete a file, in this case the BrickId property of FileInfoGeneral is mandatory | 2023-04-19 |
Response rows (Array)
Name | Type | Description | Available from version |
---|---|---|---|
Message | String | The result of the operation(success="OK") |
Code examples
C# example
var client = new BFSServiceReference.bfsapiSoapClient();
var credentials = new BFSServiceReference.Credentials()
{
UserName = bfsusername, //Username of administrative user in your instance of BFS
Password = bfspassword, //Password of the administrative user in your instance of BFS
};
Guid oG = new Guid("39bc0ada-3c40-4866-81cd-04bbc77b998b"); //previously fetched
DeleteFilesRequest oReq = new DeleteFilesRequest();
oReq.Credentials = credentials;
oReq.identify = Identify; //Unique token to identify
oReq.FileInfoDeletes = new[]
{
new FileInfoGeneral
{
BrickId = oG
}
};
DeleteFileResponse oRep = client.DeleteFiles(oReq);
if (oRep.Message=="OK")
{
Console.Writeline("Files deleted successfully");
}
else
{
Console.Writeline(string.format("Delete of files not successful: {0}", Rep.Message));
}
Blog Posts
Terms of License
Change Policy
© 2009 - 2024 Huddlestock Technologies AB All rights reserved