@Override
	public int getattr(String path, StatWrapper stat) {
		if (path.equals(PATHSEP)) { // Root directory
			stat.setMode(NodeType.DIRECTORY);
			return 0;
		}

		FsEntry entry = resolveEntry(path);

		NodeType t = null;
		if (entry != null) {
			switch (entry.getType()) {
			case BLOCK_DEVICE:
				t = NodeType.BLOCK_DEVICE;
				break;
			case FIFO:
				t = NodeType.FIFO;
				break;
			case SOCKET:
				t = NodeType.SOCKET;
				break;
			case DIRECTORY:
				t = NodeType.DIRECTORY;
				break;
			case FILE:
				t = NodeType.FILE;
				break;
			case SYMBOLIC_LINK:
				t = NodeType.SYMBOLIC_LINK;
				break;
			}
			FsEntryAttrs attrs = entry.getAttrs();
			stat.setMode(t, attrs.isUr(), attrs.isUw(), attrs.isUx(), attrs.isGr(), attrs.isGw(), attrs.isGx(),
					attrs.isOr(), attrs.isOw(), attrs.isOx()).size(attrs.getSize());
			stat.setAllTimesMillis(attrs.getTime());
			return 0;
		}
		return -ErrorCodes.ENOENT;
	};