File.exists()

Post here if you need help using Actiona
Post Reply
minx
Posts: 11
Joined: 24 Jan 2021, 20:51

File.exists()

Post by minx »

The documentation for File does not mention .exists, but it is part of the File object as a function.

So this works:

Code: Select all

if (File.exists(filename)) {
    ...
}
Wondering if this is a stable feature as it is not documented.

There is a mention here, and the work has perhaps been done?

Code: Select all

actiona --version
Actiona 3.10.1, script 1.1.0

eureka
Posts: 89
Joined: 08 Mar 2016, 22:18

Re: File.exists()

Post by eureka »

It is interesting to explore Qt objects.

But because Qt4 objects are dated and it is difficult to hunt down the documentation I have started embedding python scripts into Top bar > Script > Resources. I can then use Command object to run python scripts almost as plugins. I pass variables between Python and Actiona through text file, read as variable by Actiona.

Actiona then becomes a container for such embedded resources .. scripts.

Your File.exists() task can then be scripted in Python code.

https://stackoverflow.com/questions/828 ... exceptions

This is a longer route than writing in Code but Python is well documented.

I have found other interesting cases for this hybrid approach. One such case is using Actiona to build connectors in a microservice architecture. I will write this up later in Ideas since it seems important to share.

Post Reply