Mercurial > nomad > old-fuse
changeset 162:9edefbbd208f draft
fixup! fixup! WIP - add initial nomadsocket implementation
author | Steve Dougherty <steve@asksteved.com> |
---|---|
date | Sun, 18 Oct 2015 18:35:37 -0400 |
parents | 2d0546bd3c3f |
children | 9f771fd07445 |
files | src/fs/nomad/nomadsocket.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fs/nomad/nomadsocket.py Sat Oct 17 22:56:40 2015 -0400 +++ b/src/fs/nomad/nomadsocket.py Sun Oct 18 18:35:37 2015 -0400 @@ -13,7 +13,7 @@ # TODO: move this somewhere else attributes = namedtuple("attributes", [ "mode", - "nlink", # TODO: what is this? + "num_hardlinks", "size", "access_time", "birth_time", @@ -61,12 +61,12 @@ self._recv_header() return attributes( mode=self.conn.recv_u32(), - nlink=self.conn.recv_u32(), + num_hardlinks=self.conn.recv_u32(), size=self.conn.recv_u64(), - atime=self._recv_timestamp(), - btime=self._recv_timestamp(), - ctime=self._recv_timestamp(), - mtime=self._recv_timestamp(), + access_time=self._recv_timestamp(), + birth_time=self._recv_timestamp(), + creation_time=self._recv_timestamp(), + modification_time=self._recv_timestamp(), ) def lookup(self, parent_handle, name): @@ -121,6 +121,6 @@ def _recv_timestamp(self): # Timestamps are returned in nanoseconds. - return datetime.datetime.fromtimestamp(self.conn.recv_u64() / 10 ** 9, + return datetime.datetime.fromtimestamp(self.conn.recv_u64() / 10.0 ** 9, UTC())