× 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.




> 1) if i specify a directory in chdir() or opendir() that begins with a
> slash(/), it will not use the home directory as part of the path?

True.

> 2) if I do NOT have an opening slash(/), it will prepend the home directory
> to it?

No, it will prepend the "current working directory" to it.  When you sign
on, your current working directory is set to your home directory, but it can
be changed in the course of the job.

Again, the analogy in OS/400 is *CURLIB.  When you do a WRKOBJ
*CURLIB/something it shows the copy of "something" in your current
library.  When you sign on, the current library is set to whatever the value
of CURLIB is in your user profile.  When you run the CHGLIBL CURLIB(XXX) or
CHGCURLIB CURLIB(XXX) commands, you change that current library and now
WRKOBJ *CURLIB/something will be in library XXX.

When you don't give a full path (i.e. leave off the leading /) it assumes
that you're starting with the current directory and going forward.

You can also explicitly specify that you want to start with the current
directory by starting with dot-slash.  For example:

             './somedir/somedir/myfile.txt'

> 3) if the user has a homedir that doesn't exist or is *USRPRF (which causes
> it to be '/home/usrprfname') and that directory doesn't exist, how does
> that effect questions 1 and 2?

If the home directory doesn't exist, the current directory will be set to
the root directory "/" instead of the home directory when the user signs
on.

In other words, if you specify "somedir/somedir/myfile.txt" it would
prepend a "/" instead of prepending "/home/usrprfname"

If it helps... the "current directory" works exactly the same way in the
IFS as it does on MS-DOS and Unix systems.  Including the Windows 2000/XP
"Command Prompt."   But, I'm guessing that you haven't had much exposure
to working with command-line interfaces on the PC?

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.