nl_tokens: Converts a manta . info () into an fs . Stats object It is critical that the dev and ino values are always the same for the same object but particularly an NFS mount . NFS clients get ther fsid and fileid from these values and will consider the mount point stale if they vary .
pl_tokens: function mantaToStats ( _path , info ) { assert . string ( _path , 'path' ) ; assert . object ( info , 'info' ) ; var stats = new fs . Stats ( ) ; stats . dev = hash ( path . dirname ( _path ) ) ; stats . ino = hash ( _path ) ; if ( info . extension === 'directory' ) { stats . nlink = parseInt ( info . headers [ 'result-set-size' ] , 10 ) ; stats . isFile = _false ; stats . isDirectory = _true ; stats . mode = 0755 ; stats . size = 0 ; stats . mtime = new Date ( info . last_modified ) ; } else { stats . nlink = 1 ; stats . isFile = _true ; stats . isDirectory = _false ; stats . mode = 0644 ; stats . size = info . size ; stats . mtime = new <mask> ( info . headers [ 'last-modified' ] ) ; } stats . uid = nobody_uid ; stats . gid = nobody_gid ; stats . rdev = 0 ; stats . atime = new Date ( ) ; stats . ctime = stats . mtime ; stats . isBlockDevice = _false ; stats . isCharacterDevice = _false ; stats . isSymbolicLink = _false ; stats . isFIFO = _false ; stats . isSocket = _false ; stats . _cacheFile = stats . _cacheFile || info . _cacheFile ; stats . _fhandle = stats . _fhandle || info . _fhandle ; stats . _manta = info ; stats . _path = _path ; return ( stats ) ; }