Opens a dialog that allows the user to choose a location and name of a new file to be created. It reports a string with the absolute file path or false if the user cancels.
file-open user-new-file ;; Assumes the user will choose a file
Note that this reporter doesn't actually create the file; normally you would create the file using file-open
, as in the example.
If the user chooses an existing file, they will be asked if they wish to replace it or not, but the reporter itself doesn't cause the file to be replaced. To do that you would use file-delete
.
Note: This primitive is not compatible with NetLogo Web. If you wish to read the contents of a file with the same code and the same behavior in both NetLogo and NetLogo Web, see fetch:user-file-async.
Take me to the full NetLogo Dictionary