Saving/Loading by relative or absolute path #1305
-
I am working on a project (hxcpp target), where i need some state to be loaded before System.start(), but the path used before System.start() defaults to $HOME/.Kinc Application (obviously, because app name is not yet set). Even worse, if any read/write is executed, path used doesn't use application name for entire runtime. So..... is this just not possible/maintainable because of non-desktop targets? I'm aware that it would be awkward, but allowing saving/loading by path might be helpful for making app more self-contained, or just not to litter in $HOME, or equivalents in other OSes. Also, kinda related but also kinda not, does anybody know why language server screams on me for using sys.io.File (says i am targeting js). It compiles and even works, but its really annoying that language server just dies, because it doesn't parse anything past the first error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
Yes, that indeed doesn't make sense for non-Desktop things - just use the standard Haxe file APIs for that instead. And to make them not scream at you, change vscode to Kinc instead of HTML5 (there's a button at the bottom, see picture).