Open junk file in your temporary working directory.
Features
openjunk.openNewJunk: Open New Junk File
Creates a new file into the temporary directory and open it.
When you are programming, there are many situations where you want to write a small code snippet to check some sort of behavior. In such a case all you want to do is to write a code and run it. It's a bother to create a new file and save it at some location. This extension provides a handy way to open a new junk file.
Extension Settings
openjunk.junkDirectory
default value: null
The directory path the junk file will be stored. The default is null so you need to specify the directory before using this extension. The meaning of this value differs depending on the below openjunk.junkDirectoryTreatment option.
openjunk.junkDirectoryTreatment
default value: "path"
available values: "path", "pathDateFormat", "command"
This option configures how to convert the above openjunk.junkDirectory option value to the junk directory path.
When it is "path", no transformation is applied. The path is the value of openjunk.junkDirectory.
When it is "pathDateFormat", the value of openjunk.junkDirectory is treated as a date format string. It is formatted by Moment.js. Note that if you want to use characters having a special meaning (such as Y, M, D, ...) literally, they need to be escaped. In addition, to include \ in JSON string you may need to escape \ to \\. So you need \\Y instead of Y for example. Windows-style path separator \ cannot be used (even if it's escaped like \\\\) so use / instead.
When it is "command", the above openjunk.junkDirectory option is treated as a command line rather than a path. In this case, the actual directory path will be the standard output of the command. The command will be executed every time creating a new junk file.
openjunk.junkFilenameFormat
default value: "jun\\k_YYYYMMDD_HHmmss"
The format of the filename used when creating a new junk file. Be careful to escape the special characters, as noted above.