Commit Graph

57 Commits

Author SHA1 Message Date
Benjamin Nauck
4e992efc2e Fix misplaced link opening tag for is_directory
The opening tag was placed between the letter i and s in is_directory
instead of before the i.
2021-03-12 16:57:07 +01:00
Andrey Semashev
a031e4ffa9 Added creation_time operation.
The operation allows to query file creation time.

Implementation partially inspired by:

https://github.com/boostorg/filesystem/pull/134

Closes https://github.com/boostorg/filesystem/pull/134.
2020-08-21 01:32:04 +03:00
Andrey Semashev
7e300b986b Corrected system_complete description in the docs.
The updated description refers to absolute operation instead of
complete, which was deprecated and no longer documented in the
reference section. Also, removed a broken link to non-existing
not in the complete docs.

Closes https://github.com/boostorg/filesystem/pull/154.
2020-07-08 17:54:02 +03:00
Andrey Semashev
559b0c291a In copy, support symlink creation when target directory is not current.
When the source path is not absolute and copy_options::create_symlinks is
specified, deduce the relative path from the target location to the source
file to create a symlink. This allows to copy to a path that is not the current
path.

Also, added absolute overloads taking error_code argyment.

Also, when current_path() is used as a default argument to other operations,
and the operation also accepts error_code, use current_path(ec) to report
errors through the error code rather than throwing an exception.

Also, added a test for copy operation.
2020-05-11 15:10:23 +03:00
Andrey Semashev
80709a9411 Reworked copy operation. Added create_directory with two paths.
The updated copy implementation follows C++20 [fs.op.copy] definition
and implements additional copy options.

The new create_directory overloads accepting two paths are functionally
similar to copy_directory, but are compliant with C++20
[fs.op.create.directory]. The copy_directory operation has been deprecated
in favor of create_directory.
2020-05-10 03:02:32 +03:00
Andrey Semashev
4e6317e4b0 Make copy_file return bool, indicating whether file has been copied.
This corresponds to C++20.
2020-05-09 19:38:50 +03:00
Andrey Semashev
ac02dbed2e Added support for copy_options::update_existing to copy_file. 2020-05-09 19:19:33 +03:00
Andrey Semashev
8c3ae354a0 Require at most one copy option to be specified in copy_file. 2020-05-08 22:54:19 +03:00
Andrey Semashev
dea37d899e Added support for copy_options::skip_existing. 2020-05-08 19:09:39 +03:00
Andrey Semashev
f199152b7d Refactored copy_file, added copy_options, deprecated copy_option.
The copy_file operation implementation has been inlined into the
detail::copy_file function. The part that copies the file body has been
extracted to a separate function, so that addition of specialized copy
implementations later is possible.

Added copy_options enum, which reflects the enum from C++20. Currently,
only overwrite_existing option is supported. Other options will be added
later.

The old enum copy_option is deprecated in favor of copy_options.

Updated docs to reflect recent changes to copy_file behavior.
2020-05-05 18:34:20 +03:00
Glen Fernandes
aaf54ada48 Fix link to use Boost ML archive instead of GMANE 2020-04-09 08:23:40 -04:00
Andrey Semashev
e4de1c4138 Removed "new" content markup, HTML fixes, added lexically_proximate docs. 2019-10-05 23:18:30 +03:00
Andrey Semashev
9a14c37d6f Added directory_options. Set recursive_dir_iterator to end or pop on errors.
The directory_options enum reflects the same-named enum from C++20. It is now
supported by both directory_iterator and recursive_directory_iterator. In
particular, both iterators now support skip_permission_denied option.

recursive_directory_iterator is now set to end by default on errors, as
required by C++20. An additional directory_options::pop_on_error policy
is added to allow the iterator recover from an error. When this option is
specified and an error occurs, the iterator repeatedly pops the recursion level
until the pop completes successfully or the end state is reached.

recursive_directory_iterator that have standard counterparts (level,
no_push_pending, no_push_request and no_push) are now deprecated and can be
removed by defining BOOST_FILESYSTEM_NO_DEPRECATED. These members will be
removed in a future release.

Docs and tests updated accordingly. Also, in docs reconstructed release history
for the past releases from Boost release notes.

Fixes https://github.com/boostorg/filesystem/issues/112
Fixes https://github.com/boostorg/filesystem/issues/113
2019-08-02 19:43:46 +03:00
Jakub Wilk
97cb638138 Fix typos in documentation. 2016-12-07 12:54:33 +01:00
Beman Dawes
fca046d0c4 Merge pull request #31 from faithandbrave/patch-1
fix docs for signature stem(), extension() member functions
2016-11-26 14:18:26 -05:00
tbeu
ce0be4bfe7 Fix link text 2016-09-13 14:01:19 +02:00
Akira Takahashi
0027b3ef53 fix signature stem(), extension() member functions
`stem()` and `extension()` member functions doesn't have parameter.
2016-07-07 15:55:34 +09:00
Beman
2f6391b931 Add class path constexpr constants separator and dot of the type appropriate for the platform, and add class path member query functions filename_is_dot() and filename_is_dot_dot(). These add convenience and the implementations may be more efficient that user coded equivalent functions. Also add detail functions is_directory_separator() and is_element_separator(), and replace all uses of local is_separator() in path.cpp with detail::is_directory_separator(). 2015-12-01 10:17:45 -05:00
Beman
3c344a5f0b Revert to lexical functions back to being members of class path. This is not the time to redesign the library's lexical vs operational conventions. It would break existing users mental model of lexical vs operational.
See doc/relative_proposal.html#Add-lexical-functions for additional rationale.
2015-10-25 13:28:49 -04:00
Beman
5d31852813 Fix typo; thanks to Jonathan Wakely. 2015-09-16 15:32:57 -04:00
Beman
320423af98 Added size() function to class path. Resolves #6874, Path should have a size() member function. 2015-09-08 16:46:05 -04:00
Beman
9910eccc13 Documentation for functions lexically_normal, lexically_relative, relative, and weakly_canonical. 2015-09-05 12:02:31 -04:00
Beman
8cd5522161 Initial implementation and docs for path::reverse_iterator. 2015-09-04 11:25:22 -04:00
Beman
e6d10cf716 Fix #10766, parent_path() with redundant separator returns wrong value, by adding examples and notes to the reference documentation to show why the returned value is in fact correct, and to provide rationale for that behavior. See [path.itr], and [path.decompose] parent_path() and filename() sections of the reference docs. 2015-09-03 10:44:20 -04:00
Beman
0c68ce8962 Use same style sheet as the rest of the documentation. Tweak tab font size. Fix excessively long lines in tables, synopsis 2015-09-03 09:11:21 -04:00
Beman
95175ef819 Fix #11491, temp_directory_path doesn't return valid temp path on Android. 2015-07-22 11:13:06 -04:00
Beman
9205205043 Cleanup some symbol encoding and presentation issues. 2015-07-22 08:29:45 -04:00
Beman
335a70ca22 Change charset to utf-8 and use © for copyright symbol. 2014-12-29 07:38:57 -05:00
Beman
277180e4f9 Add "Bug Reports" to links bar, and reorder existing links. 2014-12-29 07:32:56 -05:00
Beman Dawes
7f7769d16d Document the reimplementation of path::codecvt() and path::imbue(), adding a section on path usage concerns.
[SVN r83062]
2013-02-21 14:27:10 +00:00
Beman Dawes
60e765873f Doc fixes
[SVN r80613]
2012-09-21 12:57:40 +00:00
Beman Dawes
6f223a28ed Remove spurious path::make_absolute() signature from synopsis - it was removed from class path in 2010 in favor of absolute() non-member operational function.
[SVN r80163]
2012-08-23 21:07:23 +00:00
Beman Dawes
2b74b1a45e Add missing copy_directory semantics. Fixes #5879
[SVN r79946]
2012-08-09 12:59:34 +00:00
Beman Dawes
bb0fe7585c Add BOOST_FOREACH support. Correct C++11 range-based for statement enabler signatures. Improve test coverage. Clears feature requests #5896 and #6521.
[SVN r79451]
2012-07-12 13:53:17 +00:00
Beman Dawes
af67382a81 Add directory_iterator and recursive_directory_iterator free functions begin and end so that these iterators can be used with range-based for statements.
[SVN r79409]
2012-07-10 21:17:20 +00:00
Beman Dawes
3996679b2b Fix reference title, proposal title, doc boilerplate
[SVN r78799]
2012-06-02 16:28:25 +00:00
Beman Dawes
ede84eefd7 Filesystem: Further fixes for #6932. Clarify docs. Add test cases.
[SVN r78747]
2012-05-29 15:53:02 +00:00
Beman Dawes
5ee2bb4189 Filesystem: Add path::operator+= and concat functions to tack on things like suffixes or numbers. Suggested by Ed Smith-Rowland and others.
[SVN r78065]
2012-04-18 14:46:15 +00:00
Beman Dawes
82c5b7533b Fix #4065, Boost Filesystem lexicographic path comparison inconsistent. The fix included adding path::compare functions, and cleanup and refactoring of the path relational operators code. Some of the code fixed is used by other functions, so some unrelated bugs may also have been fixed.
[SVN r77669]
2012-03-31 15:53:24 +00:00
Beman Dawes
62d3e98a46 Correct ".." description (thanks Ivan Le Lann). Add path iterator overview sentence.
[SVN r77656]
2012-03-30 21:25:35 +00:00
Beman Dawes
494b34027e Fix #5118, replace_extension doesn't work as specified in documentation
[SVN r77571]
2012-03-26 21:19:36 +00:00
Beman Dawes
7941871477 Filesystem - Delete v3 directories no longer needed. Cleanup links, namespaces, and other residue from dual v2/v3 support.
[SVN r77555]
2012-03-26 12:44:24 +00:00
Beman Dawes
16099b4c7d Filesystem - Move V3 files and directories into place
[SVN r77554]
2012-03-26 12:31:06 +00:00
Beman Dawes
fa515c07f5 Move files into new v2 + v3 directory structure
[SVN r62653]
2010-06-09 13:00:15 +00:00
Beman Dawes
e7636c26bc Filesystem: Fix #3528. Return type is bool.
[SVN r57554]
2009-11-10 19:45:47 +00:00
Beman Dawes
3c5f963a54 fix doc example typo
[SVN r53074]
2009-05-17 18:13:06 +00:00
Beman Dawes
0aaa65e768 Fix Filesystem #2925, copy_file atomiticity
[SVN r53073]
2009-05-17 15:55:46 +00:00
Beman Dawes
33487a8aeb Filesystem: add macros and deprecated names sections to docs
[SVN r49316]
2008-10-13 14:30:47 +00:00
Beman Dawes
fb65347b54 After extensive discussion on the list with Dave Abrahams, Vladimir Prus, and others, rename basic_path::leaf() -> filename, branch_path -> parent_path, replace_leaf -> replace_filename. Add basic_path member functions stem, extension, replace_extension.
[SVN r47181]
2008-07-07 12:20:04 +00:00
Beman Dawes
001c15dd32 Rename is_regular() to is_regular_file
[SVN r47131]
2008-07-06 12:10:42 +00:00