[Gambas-user] ~ doesn't seem to work.

Michael Sullivan michael at ...558...
Fri Aug 20 21:46:29 CEST 2004


My TODO program is coming along nicely.  I finished Stage 1 last night
(which is get all the necessary functions working) and now I'm on the
Stage 2 (which is enhancements).  I want to be able to place the
executable file generated from my code in a location outside of the
/home directory and have my program generate preference files within a
users home directory.  There are two user accounts on my computer, mine
(michael) and my wife's (amy).  When I run the executable, I want it to
generate a preferences file in /home/michael/.TODO_preferences unless
one already exists, in which case I want the program to read in the
values in the file.  Likewise, if my wife runs the program, I want the
preferences file to be generated in /home/amy/.TODO_preferences.  As you
know, in Linux, the symbol ~ is used to represent the current user's
home directory, but when I told Gambas that I wanted to "Open
"~/.TODO_preferences" FOR CREATE AS #myFile" it said that the file
didn't exist, However, when I changed ~ to /home/michael it worked
fine.  Is there a workaround for what I'm trying to do?





More information about the User mailing list