include/llfio/v2.0/detail/impl/posix/symlink_handle.ipp
// Used by stat_t.cpp to work around a dependency problem
Used by stat_t.cpp to work around a dependency problem
Used by stat_t . cpp to work around a dependency problem
LLFIO_HEADERS_ONLY_FUNC_SPEC result<void> stat_from_symlink(struct stat &s, const handle &_h) noexcept
  {
#if !LLFIO_SYMLINK_HANDLE_IS_FAKED
    (void) s;
    (void) _h;
    return posix_error(EBADF);
#else
    const auto &h = static_cast<const symlink_handle &>(_h);
    if(-1 == ::fstatat(h._dirh.native_handle().fd, h._leafname.c_str(), &s, AT_SYMLINK_NOFOLLOW))
    {
      return posix_error();
    }
    return success();
#endif
  }
LLFIO_HEADERS_ONLY_FUNC_SPEC result < void > stat_from_symlink ( struct stat & s , const handle & _h ) noexcept { #if ! LLFIO_SYMLINK_HANDLE_IS_FAKED ( void ) s ; ( void ) _h ; return posix_error ( EBADF ) ; #else const auto & h = static_cast < const symlink_handle & > ( _h ) ; if ( -1 == :: fstatat ( h . _dirh . native_handle ( ) . fd , h . _leafname . c_str ( ) , & s , AT_SYMLINK_NOFOLLOW ) ) { return posix_error ( ) ; } return success ( ) ; #endif }
Used by stat_t.cpp to work around a dependency problem
Used by stat_t . cpp to work around a dependency problem