Builtin functions - %dirpath & %file_exists not working as expected

0 votes
asked Feb 28, 2022 in Question / help by Andy (180 points)

Dear Community,

I do have the issues with 2 mentioned functions above. 


%dirpath

!log %dirpath() -> [Log]

path could be derived on my machine, no string [Log] output


%file_exists

!log %file_exists("c:/foo/dummy.txt") -> [log] 1

!log %file_exists("dummy.txt") -> [log] 0


Info1: other Builtin functions are working well e.g. %filename or %date. 

Info2: If I pass the absolute path return value of %file_exists is true as expected

Info3: files dummy.txt and PlantUML.puml are in same folder "foo"

Info4: Description of Builtin functions: https://plantuml.com/de/preprocessing#291cabbe982ff775


Thanks in advance

commented Feb 28, 2022 by The-Lu (67,080 points)

Perhaps have a look on:

https://plantuml.com/security

If that can help,
Regards.

commented Mar 1, 2022 by Andy (180 points)

Hi The-Lu,

thanks for your hint  https://plantuml.com/security. I tried several

PLANTUML_SECURITY_PROFILE=UNSECURE

without success sad.

But I found a possible root cause.

I´m using https://code.visualstudio.com/ with extension https://github.com/qjebbs/vscode-plantuml. The current version of this extension is using plantuml.jar 1.2022.0

If I generate the same *.puml file plantuml.jar 1.2022.1 from there https://sourceforge.net/projects/plantuml/files/plantuml.jar/download both functions 

  • %dirpath()
  • %file_exists
are working as expected. May you could check this on your machine
Best regards,
commented Mar 2, 2022 by The-Lu (67,080 points)

Hello A.,

Perhaps a defect on the VSCode PlantUML extension?

See also:

Regards.

commented Mar 3, 2022 by Andy (180 points)

Hi hi The-Lu,

I´ve ended up there https://github.com/qjebbs/vscode-plantuml/issues/80

But sadly I do not find an answer how to apply the needed settings of MS Studio Code Extension PlantUML. Could you help me out?

Again %dirpath() is still empty with MS Studio Code Extension v2.17.2

Thanks in advance

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...