[PATCH] Five patches for std::experimental::filesystem

Jonathan Wakely jwakely@redhat.com
Tue Oct 25 15:32:00 GMT 2016


Two more fixes for the filesystem TS, and improved tests.

   Handle negative times in filesystem::last_write_time
    
        * src/filesystem/ops.cc
        (last_write_time(const path&, file_time_type, error_code&)): Handle
        negative times correctly.
        * testsuite/experimental/filesystem/operations/last_write_time.cc:
        Test writing file times.

    Fix error handling in copy_file and equivalent
    
        * src/filesystem/ops.cc (do_copy_file): Report an error if source or
        destination is not a regular file (LWG 2712).
        (equivalent): Fix error handling and result when only one file exists.
        * testsuite/experimental/filesystem/operations/copy.cc: Remove files
        created by tests. Test copying directories.
        * testsuite/experimental/filesystem/operations/copy_file.cc: Remove
        files created by tests.
        * testsuite/experimental/filesystem/operations/equivalent.cc: New.
        * testsuite/experimental/filesystem/operations/is_empty.cc: New.
        * testsuite/experimental/filesystem/operations/read_symlink.cc: Remove
        file created by test.
        * testsuite/experimental/filesystem/operations/remove_all.cc: New.
        * testsuite/util/testsuite_fs.h (~scoped_file): Only try to remove
        file if path is non-empty, to support removal by other means.

Tested x86_64-linux, committed to trunk.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 17497 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161025/77b0b189/attachment.bin>


More information about the Libstdc++ mailing list