I'm on MacOS 10.13.6, Pharo v9 (but have same issue on v8).
When I want to get the directory where the current image was launched, I use the following: FileSystem workingDirectory The comments from this method are: "Returns a reference to the directory from where the image was launched" What I get (from Playground) is: FileSystem workingDirectory >>> File @ / Perhaps I am misunderstanding the comments? I can specifically tell Pharo where to find my files, but I have to then change code each time I change/update/upgrade images (across a number of applications). If there is no way, I'll move everything to a standard folder (outside the image) - this just made USB backups quick and easy to have everything in one folder... I can adapt :) Thanks, |
Hmm, I am getting another result:
FileSystem workingDirectory. "File @ /Users/sven/Develop/Pharo/Pharo-Daily/2020-05-06" Which is correct for me. This is recent 9.0 on macOS 10.15.4 > On 26 May 2020, at 13:44, Russ Whaley <[hidden email]> wrote: > > I'm on MacOS 10.13.6, Pharo v9 (but have same issue on v8). > > When I want to get the directory where the current image was launched, I use the following: > > FileSystem workingDirectory > > The comments from this method are: > "Returns a reference to the directory from where the image was launched" > > What I get (from Playground) is: FileSystem workingDirectory >>> File @ / > > Perhaps I am misunderstanding the comments? I can specifically tell Pharo where to find my files, but I have to then change code each time I change/update/upgrade images (across a number of applications). > > If there is no way, I'll move everything to a standard folder (outside the image) - this just made USB backups quick and easy to have everything in one folder... I can adapt :) > > Thanks, > Russ > > -- > Russ Whaley > [hidden email] |
In reply to this post by Russ Whaley
HI,
You have two different things: - working copy - image directory The working copy return the folder from which the image was launched. Most of the time it is the image directory but not all the time. For example ./pharo-ui ../../test/pharo.image will have the working directory be the location of the pharo-ui script. The image directory is what you are looking for. On Tue, May 26, 2020 at 1:45 PM Russ Whaley <[hidden email]> wrote: > > I'm on MacOS 10.13.6, Pharo v9 (but have same issue on v8). > > When I want to get the directory where the current image was launched, I use the following: > > FileSystem workingDirectory > > The comments from this method are: > "Returns a reference to the directory from where the image was launched" > > What I get (from Playground) is: FileSystem workingDirectory >>> File @ / > > Perhaps I am misunderstanding the comments? I can specifically tell Pharo where to find my files, but I have to then change code each time I change/update/upgrade images (across a number of applications). > > If there is no way, I'll move everything to a standard folder (outside the image) - this just made USB backups quick and easy to have everything in one folder... I can adapt :) > > Thanks, > Russ > > -- > Russ Whaley > [hidden email] -- Cyril Ferlicot https://ferlicot.fr |
On Tue, May 26, 2020 at 1:59 PM Cyril Ferlicot <[hidden email]> wrote:
> > HI, > > You have two different things: > - working copy working directory* > - image directory > > The working copy return the folder from which the image was launched. > Most of the time it is the image directory but not all the time. > > For example ./pharo-ui ../../test/pharo.image will have the working > directory be the location of the pharo-ui script. > > The image directory is what you are looking for. > > On Tue, May 26, 2020 at 1:45 PM Russ Whaley <[hidden email]> wrote: > > > > I'm on MacOS 10.13.6, Pharo v9 (but have same issue on v8). > > > > When I want to get the directory where the current image was launched, I use the following: > > > > FileSystem workingDirectory > > > > The comments from this method are: > > "Returns a reference to the directory from where the image was launched" > > > > What I get (from Playground) is: FileSystem workingDirectory >>> File @ / > > > > Perhaps I am misunderstanding the comments? I can specifically tell Pharo where to find my files, but I have to then change code each time I change/update/upgrade images (across a number of applications). > > > > If there is no way, I'll move everything to a standard folder (outside the image) - this just made USB backups quick and easy to have everything in one folder... I can adapt :) > > > > Thanks, > > Russ > > > > -- > > Russ Whaley > > [hidden email] > > > > -- > Cyril Ferlicot > https://ferlicot.fr -- Cyril Ferlicot https://ferlicot.fr |
Free forum by Nabble | Edit this page |