Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
ba4d873c
Commit
ba4d873c
authored
Dec 20, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove TODO(now) about tryReadlink() API and explain why it is the way it is.
parent
0922abdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
filesystem.h
c++/src/kj/filesystem.h
+7
-3
No files found.
c++/src/kj/filesystem.h
View file @
ba4d873c
...
...
@@ -505,10 +505,14 @@ public:
virtual
Maybe
<
String
>
tryReadlink
(
PathPtr
path
)
=
0
;
// If `path` is a symlink, reads and returns the link contents.
//
// See Directory::symlink() for warnings about symlinks.
// Note that tryReadlink() differs subtly from tryOpen*(). For example, tryOpenFile() throws if
// the path is not a file (e.g. if it's a directory); it only returns null if the path doesn't
// exist at all. tryReadlink() returns null if either the path doesn't exist, or if it does exist
// but isn't a symlink. This is because if it were to throw instead, then almost every real-world
// use case of tryReadlink() would be forced to perform an lstat() first for the sole purpose of
// checking if it is a link, wasting a syscall and a path traversal.
//
// TODO(now): Should tryReadlink() throw if the path exists but is not a link? Currently it
// returns null.
// See Directory::symlink() for warnings about symlinks.
};
enum
class
WriteMode
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment