file owner & group names

Jan Schenkel janschenkel at yahoo.com
Wed Aug 18 00:38:55 CDT 2010


--- On Tue, 8/17/10, I wrote before my first mug of coffee:
> --- On Tue, 8/17/10, Andre Garzia
> <andre at andregarzia.com>
> wrote:
> > 
> > Why not use shell("stat <the file>") to acquire
> the
> > information?
> > 
> > 
> 
> Hi Andre,
> 
> It looks like "stat" has the advantage over "ls -l" when it
> comes to displaying the complete user and group name - my
> user name is "janschenkel" which is cut down to 8 characters
> using "ls -l" so that's not a workable solution.
> 
> The reason to avoid a shell call to stat is simple: calling
> it for each individual file in a big folder could prove an
> expensive operation, while a simple mapping method should
> suffice to convert 501 to "janschenkel" when you're already
> using the detailed files.
> 

Thinking it over, we could build a caching mechanism and only fall back to "stat" if we don't have the id in our cache already. 
Poirot shall investigate :-)

Jan Schenkel.
=====
Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


      




More information about the use-livecode mailing list