Notifications
Clear all
[Closed] break process if longer then
Apr 01, 2016 5:11 pm
As many know, doesFileExist as well as dotnet File.Exists / FileInfo.Exists / Directory.Exists sometimes take long, especially for missing on a network.
I want to let my application find existing and missing files, first of all for those that take less then 15ms, if longer then just return “checking”, and I will check them in a BGW.
fn doesFolderExistDNfn folderPath timeout:15 =
(
local sioDir = dotNetClass "System.IO.Directory"
if folderPath!=undefined and folderPath!="" then
(SIODir.Exists folderPath)
else false
)
This way, there will be no feeling that my application is slow, because I will display to the user fast results, and just some of them will come later.
Now, please help me break this dotnet checking feature, so that it could work smooth for the next file from the loop (In this case I have for folder, but I will apply it to the file as well)
1 Reply