Open/Create/Replace File
- Updated2023-02-17
- 3 minute(s) read
Open/Create/Replace File
Obtains a reference to a file.
Inputs/Outputs

prompt
Custom message in the title bar of the file dialog box that appears when you do not wire a value to the input path.

file path
Absolute path to the file you want to open.

operation
Action that this node is allowed to perform on the specified file.
| open |
Opens an existing file. |
| replace |
Replaces an existing file by opening the file and setting its end of file to 0. |
| create |
Creates a new file. |
| open or create |
Opens an existing file or creates a new file if one does not exist. |
| replace or create |
Creates a new file or replaces a file if it exists. This node replaces a file by opening the file and setting its end of file to 0. |
| replace or create with confirmation |
Creates a new file or replaces a file if it exists and you give permission. This node replaces a file by opening the file and setting its end of file to 0. |
Default value: open

access
Allowable ways to access the returned file.
| read/write |
Allows you to read or write to the returned file. |
| read-only |
Allows you to read from the returned file. |
| write-only |
Allows you to write to the returned file. |
Default value: read/write

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

disable buffering
A Boolean that specifies whether the file opens without buffering, which, for large amounts of data, may increase the rate of data transfer to the file.
| True | The file opens without buffering. |
| False | The file opens with buffering. |
Default value: False

refnum out
Reference to the open file.
If the file cannot be opened, the value of this output is Not A Refnum.

cancelled?
A Boolean value that indicates whether the user cancelled the dialog box that appears if no input file was wired to this node.
| True | The dialog box was cancelled. |
| False | The dialog box was not cancelled, or the dialog box did not appear. |

error out
The node produces this output according to standard error behavior.
This node can return the following error codes.
| 7 | The user attempted to open or replace a file that cannot be found. |
| 10 | The user attempted to create a file that already exists. |
| 43 | The user cancelled the dialog box. |