Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Minor editorial corrections to 431 formatting |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a4a3ebcbb39a98a2b02dc95572fbacae |
User & Date: | dkf 2018-05-27 11:33:15.545 |
Context
2018-05-28
| ||
08:36 | tip454(resize frame on last child remove): withdrawn due to critical incompatibility. Should be restarted with alternate solution or in Tk 9.0 check-in: 660df61ab3 user: oehhar tags: trunk | |
2018-05-27
| ||
11:33 | Minor editorial corrections to 431 formatting check-in: a4a3ebcbb3 user: dkf tags: trunk | |
10:50 | Fix markdown formatting issue check-in: 230d2e87e1 user: dkf tags: minor change, trunk | |
Changes
Changes to tip/431.md.
1 2 3 4 5 6 | # TIP 431: Add 'tempdir' Subcommand to 'file' Author: Kevin Pasko <[email protected]> State: Draft Type: Project Tcl-Version: 8.6.4 Vote: Pending | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # TIP 431: Add 'tempdir' Subcommand to 'file' Author: Kevin Pasko <[email protected]> State: Draft Type: Project Tcl-Version: 8.6.4 Vote: Pending Created: 10-Sep-2014 Keywords: Tcl, directory, file Post-History: ----- # Abstract This TIP proposes adding a new **tempdir** subcommand to the **file** |
︙ | ︙ | |||
22 23 24 25 26 27 28 | without the possibility of race conditions. # Specification The **file tempdir** command shall implement the functionality of the POSIX standard mkdtemp\(\) function. With no arguments **file tempdir** shall create a uniquely named temporary directory in the native operating system's | | | > > | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | without the possibility of race conditions. # Specification The **file tempdir** command shall implement the functionality of the POSIX standard mkdtemp\(\) function. With no arguments **file tempdir** shall create a uniquely named temporary directory in the native operating system's temporary directory, with naming convention "<b>tcl\_</b><i>XXXXXX</i>" where each _X_ is a randomly selected character \(following the **file tempfile** naming convention\). Successful completion of **file tempdir** shall return the absolute path of the created directory, otherwise an error shall be thrown. **file tempdir** shall have an optional argument, _template_, to modify the created directory's path and name. The _template_ shall be decomposed into \(up to\) two parts: the directory's path and rootname. If either part is absent, relevant defaults \(e.g., according to the native operating system\) shall be used. The entire temporary name shall then be formed from the path, the root, and a generated unique string of \(typically\) six characters. If the directory part of the _template_ is supplied, it should refer to a directory on the native filesystem. The command syntax should be defined as: > **file tempdir** ?_template_? # Considerations * The subcommand **tempdir** could be a candidate, later, for returning the native file system's temporary directory. Naming the subcommand something else such as **mktempdir** is another option, though strays from the **file tempfile** naming convention. * For future extensibility the _template_ argument to **file tempdir** \(since it is optional\) could be specified in the key / value format, **-template** _template_, changing the command syntax to: > **file tempdir** ?_options..._? # Reference Implementation An example of temporary directory creation has already been developed into the Tcl core, at the C level, within the platform specific layers of the **load** command. The principal work remaining is to expose this via a Tcl command. # Copyright This document has been placed in the public domain. |