lua-users home
lua-l archive

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

Hash: SHA1

Duck wrote:
> Pity. This would be so much more generally useful if it were portable to
> Windows. Windows NT and later supports symlinks. (Up to Vista, only
> directories can be soft-linked; such links are called 'junctions' or
> 'mount points'. From Vista on, both files and directories can be
> soft-linked; such links are, imaginatively, known as symbolic links.)

Just to make life more exciting, Cygwin implements its *own* symlink system on
the application level using one of several ways of storing them. SFU,
Microsoft's own Unix layer for Windows, does the same... differently. Yay.

> On Linux/Unix IIRC I assume that you can simply compare the inode from
> stat() and lstat().

Actually, you can just call lstat() and use S_ISLNK() on the result.

Incidentally, one minor bug report: because S_ISSOCK() and S_ISLNK() are
actually Posix extensions, if you try to compile with flags like
_XOPEN_SOURCE, then luafilesystem will break. I haven't quite tracked down
what's necessary to trigger this yet --- on Linux the API flag settings are a
horrible labyrinth of undocumented #ifdefs.

- --
┌── ─── ───────────────────
│ "There does not now, nor will there ever, exist a programming language in
│ which it is the least bit hard to write bad programs." --- Flon's Axiom
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -