On Fri, 29 May 2020 14:41:05 -0400, Ken Hornstein said: > > 2) would it be reasonable to have a mh-format that returned the number of > > hard links so that I could see in my scan that it was also stored > > elsewhere? > > That should be relatively straightforward, although it sounds like a bunch > of layer violations to me (not that we really have many layers in nmh, > but we should!). Again, it has limited utility if the filesystem doesn't > support hard links.
Well, if the system is Unixoid enough to *have* a stat() system call, and you stat() a file on a file system that doesn't support multiple hard links, it will just set the stat.st_nlink field to 1. And I'm going to make a guess that most nmh users are using a sane filesystem that does have multiple links. The bigger thing will be bulletproofing it for things like the purported file actually being a directory or a symlink or other non-file entity.
pgpS7gsbEnZF4.pgp
Description: PGP signature