Skip to content

Commit

Permalink
parent_path() : パス名末尾/の挙動について追記
Browse files Browse the repository at this point in the history
多分windowsも同じだと思うけど試してません
  • Loading branch information
onihusube committed Apr 15, 2024
1 parent c18cdd7 commit ee8e4dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reference/filesystem/path/parent_path.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ int main()
fs::path ps[] = {
"/foo/bar.txt", // ファイル名を含むパス
"/foo/bar/", // ディレクトリパス
"/foo/bar", // ディレクトリパス(末尾/なし)
"/" // ルートパスのみ (ルートパスの親はルートパスなのでそのまま返る)
};

Expand All @@ -46,6 +47,7 @@ int main()
```
"/foo/bar.txt" : "/foo"
"/foo/bar/" : "/foo/bar"
"/foo/bar" : "/foo"
"/" : "/"
```

Expand Down

0 comments on commit ee8e4dc

Please sign in to comment.