× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve Seroogy wrote on 21/08/2007 12:13:26:

Scott,

If I understand what you are saying instead of opening up each directory
I can use one opendir() statement that opens up
/transfer/WMS/Upload/MAPICS/. Then I read and process the text files
that are located in that directory.

I hope you don't mind if I jump in here too Steve, since this is a
question I can answer. You are correct that you only need to open the one
directory "/transfer/WMS/Upload/MAPICS/". To rephrase what Scott said,
you do not need to open each directory in a tree to get access to the
lower directories.

When working with Unix-type filesystems, you can think of directories as
just a special kind of file. It is just a list of links to the file
inodes (which is an operating system structure that indicates where each
chunk of the file is on the disk), something like this

Filename inode
fileA 722512
mysheet.xls 801571
my plan for world domination.txt 002302

The inode is what actually holds info about the file such as permissions,
total size, modification time, etc. If you're interested, the Wikipedia
article on inodes seems pretty good.


Then at the end of my readdir(DIR)
loop I can perform my closedir(Dir) command.

Just like with other files, you need to close the directory once you're
done reading it. As Scott mentioned, you need to make sure that DIR still
refers to the directory you opened in the first place.


Then if I had only one opendir() statement the is run every 4 minutes it
could run up to 13 hours before have to end and resubmit the job?

Only if you never closed the directories. I think that 200 is the maximum
number of IFS objects that can be open simultaneously, not the total
number that can be opened over the life of the job.

Hope this helps,
Adam

Attention:

The information contained in this message and or attachments is
intended only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon, this
information by persons or entities other than the intended recipient is
prohibited. If you received this message in error, please contact the sender and
delete the material from any system and destroy any copies. Thank you for your
time and consideration.

Attention:

Le contenu de ce message et(ou) les fichiers ci-joints s?adressent
exclusivement à la personne ou -entité à laquelle ils sont destinés. Ils peuvent
contenir de l?information confidentielle, protégée et(ou) classifiée. Il est
strictement interdit à toute personne ou entité autre que le(la) destinataire
prévu(e) de ce message d?examiner, de réviser, de retransmettre ou de diffuser
cette information, de prendre une quelconque action en fonction ou sur la base
de celle-ci, ou d?en faire tout autre usage. Si vous avez reçu ce message par
erreur, veuillez communiquer avec l?expéditeur(trice), supprimer ce message et
les fichiers ci-inclus de tout système, et en détruire toutes copies, qu?elles
soient électroniques ou imprimées. Nous vous remercions de votre entière
collaboration.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.