P
phil.swenson
I'm trying to find the full path to a file. File.dirname(__FILE__)
always returns ".", which doesn't really do me any good. The working
directory is not always the same as where the file is, so I can't use
the "." in any useful way.
What I'm trying to do is locate where a particular file is because I
know where other files are in relation to this particular file. I
don't know what the working directory will be though, anyone could
execute the ruby file originating from any location.
Thanks for any thoughts....
phil
always returns ".", which doesn't really do me any good. The working
directory is not always the same as where the file is, so I can't use
the "." in any useful way.
What I'm trying to do is locate where a particular file is because I
know where other files are in relation to this particular file. I
don't know what the working directory will be though, anyone could
execute the ruby file originating from any location.
Thanks for any thoughts....
phil