in reply to Re: Re: Find the full path of the script at run time
in thread Find the full path of the script at run time
In this case, however, you are bumping into the difference between abs_path() and fast_abs_path(): both generate cannonical paths, but the first relies on the OS by repeatedly issuing chdir() on path fragments in order to verify that Cwd and the OS are in agreement. This will cause problems if the path in question is hypothetical or if you do not have permission to traverse the path tree.
fast_abs_path(), on the other hand, does this "visually" without checking with the OS -- as a consequence it's much faster, but potentially more risky.
99% of the time this is not a problem for most paths. If your paths have a tendency to utilize soft links that cross volumes and mount points (therefore potentially different filesystem types), then it can be a problem. Since Windows doesn't have soft links (shortcuts aren't soft links) then you shouldn't have a problem using fast_abs_path().
Wrote a song about it once. Like to see it? Here it is.
Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^3: Find the full path of the script at run time
by ibanix (Hermit) on Mar 13, 2003 at 00:29 UTC |