2623. [filesys.ts] [PDTS] Request for create_regular_file() and/or touch()

Section: 15 [filesys.ts::fs.op.funcs] Status: NAD Submitter: CH-14 Opened: 2014-01-20 Last modified: 2016-08-10

Priority: Not Prioritized

View all other issues in [filesys.ts::fs.op.funcs].

View all issues with NAD status.

Discussion:

Addresses: filesys.ts

Since create_symlink(), create_hardlink(), and create_directory() exist, there's no reason not to have a create_regular_file() function.

Consider adding a function create_regular_file() with the behaviour of the POSIX touch command.

[Beman comments]

create_regular_file() and touch() should be different functions since their behavior would differ if the file already exists; touch() updates the last write date.

I have often wanted create_regular_file() but never got around to adding it.

While touch is quite useful from the command line, I'm less sure of its usefulness as a library function. It is trivial for a user to implement.

Whether or not it is appropriate to add operational functions this late in the PDTS process is questionable.

[2014-02-13 LWG/SG-3 Issaquah: No consensus for change at this time.]

Proposed resolution: