[all-commits] [llvm/llvm-project] 95994d: [Support] Add path-based setLastAccessAndModificat...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri May 29 16:41:45 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95994d1e630722badb647a423f6e78f806c983d9
      https://github.com/llvm/llvm-project/commit/95994d1e630722badb647a423f6e78f806c983d9
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M llvm/include/llvm/Support/FileSystem.h
    M llvm/lib/Support/Path.cpp
    M llvm/lib/Support/Windows/Path.inc
    M llvm/unittests/Support/Path.cpp

  Log Message:
  -----------
  [Support] Add path-based setLastAccessAndModificationTime overload (#199256)

The existing setLastAccessAndModificationTime takes a file descriptor.
Add a const Twine & overload that opens the path internally so callers
no longer need to manage the fd themselves. The new overload accepts
both files and directories: on POSIX, O_RDONLY opens directories and the
existing fd-based implementation accepts a directory fd. On Windows,
FILE_FLAG_BACKUP_SEMANTICS is required to obtain a handle for a
directory.

The path overload pair mirrors the existing (Twine &) / (int FD) shape
used by setPermissions and resize_file.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list