File operations and conclusion

Dear @renato,
please take also a while to investigate the suggestion said by @anke.
She's got a huge experience in the "forest" of file handling on Android, and she has written lot of tutorials on the matter. You'll find them by digging the forum in the search tool.
Best wishes !

PS I also worked with VB (a life ago!) to make user interfaces of Siemens S7 PLC's and in that environment the synchronization with the HW was more strict and effective. But I'm talking about WinNT or Win95 and I was allowed to rise up the VB priority to the maximum, so probably the overall behaviour was closer to a RT ....
Per aspera ad astra (i.e. never give up !).

1 Like

A simple example, running companion it takes milliseconds to complete

1 Like

Thanks a lot TIM.
Great, as usual !!
Cheers, ugo

Edit ...recursive code: not allowed in embedded systems :rofl: :rofl: :rofl:

thanks all.
I'll close if you don't have anything against it

Dear Renato,
you can set as "solution" the answer from @Anke or @TIMAI2, whichever you'll apply.
Ciao.

Thanks TIMAI2, I'll use your example as guide line in future.
Hope you help me on some other question. Bye

As a guide for what?

Where is the problem for example with these simple blocks:

So can someone please explain to me what this is really about? :pray:
It really shouldn't be that hard.

I agree... this should be the solution to create several directories... Simple is best...

Taifun

But the OP wanted confirmation that a. the directory was created, and b. that the creation cycle had completed.

I don't see any problem here. :thinking:

1 Like

Assume Nothing, Trust No-one :wink:

Why??

But if it has to be, then e.g. so:

Why not just use return value of MakeDirectory block?

1 Like

@Anke, you have essentially done what I did in my blocks. Given you didn't understand what the OP wanted in the first place, I am surprised that you even provided blocks. ( I have a long memory, well, at least a week or so :wink: )

No
From the documentation Storage

MakeDirectory(scope,directoryName)
Create a new directory for storing files. The semantics of this method are such that it will return true if the directory exists at its completion. This can mean that the directory already existed prior to the call.

Taifun

1 Like

Belt and braces, why not?

1 Like

Because my last block can be executed even without/after creating the directories.

I would assume the worst, that these are long running tasks requiring completion events.
undefined

Professor Butts and the Self-Operating Napkin (1931). Soup spoon (A) is raised to mouth, pulling string (B) and thereby jerking ladle (C), which throws cracker (D) past toucan (E). Toucan jumps after cracker and perch (F) tilts, upsetting seeds (G) into pail (H). Extra weight in pail pulls cord (I), which opens and ignites lighter (J), setting off skyrocket (K), which causes sickle (L) to cut string (M), allowing pendulum with attached napkin to swing back and forth, thereby wiping chin.

For such a scheme, have each completion Event trigger the next operation.

1 Like

Interesting, if I could now understand the specific context regarding this topic, it would be nice. :woman_shrugging:

"Longum iter est per praecepta, breve et efficax per exempla."
Lucius Annaeus Seneca

The path is long through teaching, short and effective through examples.

1 Like

In a latin nuthshell:
"Quousque tandem, File System, abutere patientia nostra ?"

:rofl: :rofl: :rofl: