Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
93ed4729
Commit
93ed4729
authored
Mar 02, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented memDir.LookUpInode.
parent
a2c55f32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
samples/memfs/dir.go
samples/memfs/dir.go
+14
-1
No files found.
samples/memfs/dir.go
View file @
93ed4729
...
...
@@ -50,4 +50,17 @@ func (d *memDir) checkInvariants() {
// Find the inode ID of the child with the given name.
//
// LOCKS_EXCLUDED(d.mu)
func
(
d
*
memDir
)
LookUpInode
(
name
string
)
(
id
fuse
.
InodeID
,
ok
bool
)
func
(
d
*
memDir
)
LookUpInode
(
name
string
)
(
id
fuse
.
InodeID
,
ok
bool
)
{
d
.
mu
.
RLock
()
defer
d
.
mu
.
RUnlock
()
for
_
,
e
:=
range
d
.
entries
{
if
e
.
Name
==
name
{
ok
=
true
id
=
e
.
Inode
return
}
}
return
}
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