Created on 2014-05-22.00:00:00 last changed 101 months ago
Proposed resolution:
In [class.directory_entry] Class directory_entry
add the
following observer declarations:
uintmax_t file_size(); uintmax_t file_size(error_code& ec) noexcept;
In directory_entry
observers [directory_entry.obs]
add the following:
uintmax_t file_size(); uintmax_t file_size(error_code& ec) noexcept;Returns: if
*this
contains a cached file size, return it. Otherwise returnfile_size(path())
orfile_size(path(), ec)
respectively.Throws: As specified in Error reporting (7).
[ 2016-08, Beman comments ]
This will be resolved by P0317R1, Directory Entry Caching for Filesystem.
Fri AM: Moved to Tentatively Resolved
[ Apr 2016 Issue updated to address the C++ Working Paper. Previously addressed File System TS ]
Previous resolution [SUPERSEDED]
In [fs.class.directory_entry] Class
directory_entry
add the following observer declarations:uintmax_t file_size(); uintmax_t file_size(error_code& ec) noexcept;In
directory_entry
observers [fs.dir.entry.obs] add the following:uintmax_t file_size(); uintmax_t file_size(error_code& ec) noexcept;Returns: if
*this
contains a cached file size, return it. Otherwise returnfile_size(path())
orfile_size(path(), ec)
respectively.Throws: As specified in Error reporting (7).
[ Mar 2016 Jacksonville Beman to provide paper about this ]
[ 23 Nov 2015 Editorally correct name of data structure mentioned in discussion. ]
[ 17 Jun 2014 Rapperswil LWG will investigate issue at a subsequent meeting. ]
On Windows, the
structure, which is the underlying data type for FindFileData WIN32_FIND_DATAdirectory_entry
, contains the file size as one of the fields.
Thus efficient enumeration of files and getting their sizes is possible without doing a separate query for the file size.
History | |||
---|---|---|---|
Date | User | Action | Args |
2016-08-06 20:44:18 | admin | set | status: new -> resolved |
2016-08-01 17:17:36 | admin | set | messages: + msg8272 |
2016-04-10 22:23:37 | admin | set | messages: + msg8037 |
2016-03-07 04:46:57 | admin | set | messages: + msg8006 |
2016-01-28 01:00:35 | admin | set | messages: + msg7915 |
2016-01-28 01:00:35 | admin | set | messages: + msg7914 |
2016-01-28 01:00:35 | admin | set | messages: + msg7913 |
2014-05-22 00:00:00 | admin | create |