[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Automatic updating links?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jun 06, 2017 at 12:27:06PM +0100, Rodolfo Medina wrote:
> I wish to create a link to a file that wouldn't break when that file is moved
> on elsewhere in the filesystem or renamed, nay the link would automatically
> `update' pointing at the new name/address of the file.  Is that possible?
> Besides, I wish that form of automatic update also when moving or renaming the
> directory where the link itself lives.

Hm. Tough question. The most correct answer is, alas, "no". You'll have to
refine your requirements to understand why.

What shall happen when you modify the file's content? What shall happen
when you split the file into three parts? The link now points to three
files?

Once you have refined the requirements, you might come up with a strategy.
For example, if you consider files as immutable, you might consider storing
their (primary) locations under their (content) hash, kind of what Git
does behind the scenes (and some deduplicating file systems -- this pattern
has come up time and again, cf. "content addressable store"). This might
work as long as the files aren't huge (e.g. videos), where calculating the
hash itself would be prohibitive in terms of time and consumed I/O. If
files are mutable, things become more "interesting" (Git heroically tries
to tackle that, and it works "mostly", but Git's "clients" are mostly
source code files, i.e. a small subset of what files can be.

After you're clear on what you really want to have, you may perhaps find
something "out there" which fits the bill. For example, there's (at least
one) FUSE based file system with a Git backend.

Hope this gives you some ideas.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlk2lPcACgkQBcgs9XrR2kZeHQCbBhQjduOGXwr6IGGW9xcZr2LT
5w8An0/HHctW3X3yigRxq2MJ6AGwUVR5
=5vzu
-----END PGP SIGNATURE-----


Reply to: