comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: linked file yes or no
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: linked file yes or no [message #12808] Wed, 09 September 1998 00:00
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
> did someone know a faster way to get the same information on an unix
> system like
> test_result = (findfile('-l '+file_name))(0)

Yes. See "man lstat" 8-)

The way to do it is to use call_external (or similar) to access the
system routine stat(). Similar to the hack a few months ago to
add a routine called GETPID().

To make the whole thing a bit more flexible, though, and to get
some excercise with dynamically loadable modules (DLM), I wrote
a utility FILESTAT("filename"), which could serve as an example
on how to expand IDL by adding new, useful routines through
the DLM mechanism.

This is also an excellent example on tasks where *tremendous*
speedups (about a factor of 500 on my machine!) may be achieved by
(relatively) simple call_external additions. Of course, portability
(at least to outside the Unix family) is a problem.

In fact, I ended up writing a web page with examples on DLMs.
It's available at

http://www.uio.no/~steinhh/IDL/additions.html

I hope it's of use to people.

Regards,

Stein Vidar
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Annoyances...how about this one?
Next Topic: God's Gift to Humankind, Was: 24-bit color Postscript

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:12:11 PDT 2025

Total time taken to generate the page: 0.00558 seconds