MISSIONS FILES MASTER 4/4 - Get File Count API

Mission: FILES MASTER
Task: Get file count using API

Hi Mark,

This should work, but it does not in iOS/SWIFT :

Backendless.shared.file.getFileCount(path: “web”, pattern: “*.html”, recursive: true, responseHandler: { filesCount in
print(“Files count = (filesCount)”)
}, errorHandler: { fault in
print(“Error: (fault.message ?? “”)”)
})

Best Regards

Hi Sylvain,

What result does the API call return?

Mark

Hi Mark,
well, the API gives back the count number of 6 (with getFileCount). And the corresponding listing is (with listing method):

disabled.html [web/templates/registration/disabled.html]
index.html [web/templates/change_password/index.html]
index.html [web/templates/registration/index.html]
index.html [web/templates/session_expiration/index.html]
index.html [web/index.html]
task.html [web/mission accomplished/task.html]

Best regards

Hello @Sylvain_Geron

Our engineer will take a look at this problem as soon as possible.

Regards, Vlad

I have the same issue.

This code for iOS doesn’t complete the mission:

     Backendless.shared.file.getFileCount(path: "web", pattern: "*.html", recursive: true, responseHandler: { filesCount in

             print("Files count = \(filesCount)")

         }, errorHandler: { fault in

             print("Error: \(fault.message ?? "")")

         })

Answered in the related support topic.