\r\n')
+ Write('| ')
+ local link = EscapeHtml(name)
+ if kind == unix.DT_DIR then link = link .. "/" end
+ Write('' .. link .. '')
+ Write('\r\n')
+
+ Write(' | ')
+ if kind == unix.DT_REG then Write('DT_REG')
+ elseif kind == unix.DT_DIR then Write('DT_DIR')
+ elseif kind == unix.DT_FIFO then Write('DT_FIFO')
+ elseif kind == unix.DT_CHR then Write('DT_CHR')
+ elseif kind == unix.DT_BLK then Write('DT_BLK')
+ elseif kind == unix.DT_LNK then Write('DT_LNK')
+ elseif kind == unix.DT_SOCK then Write('DT_SOCK')
+ else Write('DT_UNKNOWN')
+ end
+ Write('\r\n')
+
+ Write(' | %d\r\n' % {ino})
+ Write(' | %d\r\n' % {off})
+
+ st,err = unix.stat(path..'/'..name, unix.AT_SYMLINK_NOFOLLOW)
+ if st then
+
+ Write(' | %d\r\n' % {st:size()})
+ Write(' | %d\r\n' % {st:blocks()})
+ Write(' | %.7o\r\n' % {st:mode()})
+ Write(' | %d\r\n' % {st:uid()})
+ Write(' | %d\r\n' % {st:gid()})
+ Write(' | %d\r\n' % {st:dev()})
+ Write(' | %d,%d\r\n' % {unix.major(st:rdev()), unix.minor(st:rdev())})
+ Write(' | %d\r\n' % {st:nlink()})
+ Write(' | %d\r\n' % {st:blksize()})
+ Write(' | %d\r\n' % {st:gen()})
+ Write(' | %#x\r\n' % {st:flags()})
+
+ function WriteTime(unixsec,nanos)
+ year,mon,mday,hour,min,sec,gmtoffsec = unix.localtime(unixsec)
+ Write(' | %.4d-%.2d-%.2dT%.2d:%.2d:%.2d.%.9d%+.2d%.2d\r\n' % {
+ year, mon, mday, hour, min, sec, nanos,
+ gmtoffsec / (60 * 60), math.abs(gmtoffsec) % 60})
+ end
+
+ WriteTime(st:birthtim())
+ WriteTime(st:mtim())
+ WriteTime(st:atim())
+ WriteTime(st:ctim())
+
+ else
+ Write(' | %s\r\n' % {err})
+ end
+ ::continue::
+ end
+ Write(' |