Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::filesystem::path::is_absolute,is_relative

      From cppreference.com
      <cpp‎ |filesystem‎ |path
       
       
      Filesystem library
      Classes
      Functions
      File types
       
      std::filesystem::path
      Member types
      Member constants
      Member functions
      Path decomposition
      Non-member functions
      (until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
      Helper classes
       
      bool is_absolute()const;
      (1)(since C++17)
      bool is_relative()const;
      (2)(since C++17)

      Checks whether the path is absolute or relative. An absolute path is a path that unambiguously identifies the location of a file without reference to an additional starting location. The first version returnstrue if the path, in native format, is absolute,false otherwise; the second version the other way round.

      Contents

      [edit]Parameters

      (none)

      [edit]Return value

      1)true if the path is absolute,false otherwise.
      2)false if the path is absolute,true otherwise.

      [edit]Exceptions

      May throw implementation-defined exceptions.

      [edit]Notes

      The path"/" is absolute on a POSIX OS, but is relative on Windows.

      [edit]See also

      (C++17)
      composes an absolute path
      (function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/path/is_absrel&oldid=136526"

      [8]ページ先頭

      ©2009-2025 Movatter.jp