User | Kudos |
---|---|
6 | |
5 | |
3 | |
3 | |
2 |
The Open/Create/Replace file I/O primitive is pretty powerful. It will check to see if the file is there for you, and, if not, create a new one. I use the "Open or Create" option often when generating multiple delimited text files in long term tests. When a new file is created, I need know so I can add a header, and I need to skip the header operation if the file is being appended. Sure, I could check to see if the file exists before trying to open it, but then wouldn't that just make the power of the Open/Replace/Create function redundant? Some operation took place based on my input to the "operation" terminal, and whether or not the file exists. Unfortunately, I have no idea what that operation was, because the function doesn't tell me. Let me know if the Open/Create/Replace function created a new file so I can add my header.
This is not without precedent. For example, the "Obtain Queue" primitive has an option to create a new queue if a queue of the given name is not found. It let's you know if the new queue was created:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.