[luatex] readlink?

Elie Roux elie.roux at telecom-bretagne.eu
Mon Mar 1 18:34:56 CET 2010


Hello,

during some scripting for a font database to be used with LuaLaTeX, I 
encountered two difficulties (Unix-only) :
 - I couldn't know if I had the permission or not to write on a file: 
lua.attributes() gives me uid, gid and the persmission string, but this 
is unusable as I don't know what is the uid of the program, and I know 
even less if I'm in a group that fits the permissions...
 - I couldn't know where the symlinks were pointing to

A solution to these two problems would be the inclusion of the posix[1] 
library. I know you're quite reluctant to new libraries inclusion, but I 
think these two problems (especially the first one) will be encountered 
by many users or at least package writers under Plain/LaTeX. Would you 
be interested in a patch implementing the needed functions to solve 
these problems? Or including the whole library? It's in the public 
domain so there aren't no legal problems.

Thank you in advance,
-- 
Elie

[1]: http://luaforge.net/frs/download.php/3572/luaposix-5.1.4.tar.gz


More information about the luatex mailing list