Skip to content

Commit

Permalink
Finish incomplete docstring for defaultStat. Avoid getting the UID/GI…
Browse files Browse the repository at this point in the history
…D twice.
  • Loading branch information
EtiennePerot committed Mar 18, 2014
1 parent 270a8cf commit b41b319
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/net/fusejna/FuseFilesystem.java
Expand Up @@ -364,16 +364,19 @@ final int _write(final String path, final Pointer buffer, final TypeSize size, f

/**
* Subclasses may override this to customize the default parameters applied to the stat structure, or to prevent such
* behavior (by overriding this method with an empty one)
* behavior in the first place (by overriding this method with an empty one).
*
* @param stat
* The
* @param wrapper
* The StatWrapper object to write to.
* @param uid
* The UID under which the JVM is running.
* @param gid
* The GID under which the JVM is running.
*/
protected void defaultStat(final StatWrapper wrapper, final long uid, final long gid)
{
// Set some sensible defaults
wrapper.setMode(NodeType.DIRECTORY).setAllTimesMillis(System.currentTimeMillis()).nlink(1).uid(FuseJna.getUid())
.gid(FuseJna.getGid());
wrapper.setMode(NodeType.DIRECTORY).setAllTimesMillis(System.currentTimeMillis()).nlink(1).uid(uid).gid(gid);
}

@UserMethod
Expand Down

0 comments on commit b41b319

Please sign in to comment.