Open chshersh opened 2 years ago
how should the function behave if "Ask" is combined with NonInteractive? I would say that the sensible default is to NOT overwrite. Also, what's the response to "overwrite? NO" ? throw an exception?
Edit: To access the Interactive setting the function would need to run within the App context though.
When using the
writeFile
function, the program silently overrides the file content. In this case, you may lose your previous content if you're careful enough.I propose to create a new module
Iris.IO
and add a protectedwriteFile
function that:data ActionFlag = Ask | Force
Ask
is given, it checks for file existence and asks a question, whether user wants to override file content.