openWithDefaultApplication fails on files in application folder

后端 未结 1 515
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 23:20

I\'ll ONLY recieve an \"Error #3000: Illegal path name\" if I try to open a file which is placed inside the app-folder of the air. If the file is somewhere else outside of t

相关标签:
1条回答
  • 2021-01-01 00:07

    After reading the document a few times i saw that this is not possible (it's not a bug, it's a feature!?!)

    Opening files with the default system application

    You cannot use the openWithDefaultApplication() method with files located in the application directory.

    So I do this instead:

    file.copyTo(tempFile);
    tempFile.openWithDefaultApplication();
    

    Not so nice, but it works.

    0 讨论(0)
提交回复
热议问题