[Gambas-user] Load hidden file to variable?

nando nando_f at ...951...
Mon Apr 2 10:39:09 CEST 2012


A hidden file IS hidden by default from normal views.
So, the result appears to be correct.
(Benoit: maybe a flag is needed for hidden files in call?)
Nevertheless, LOAD ought to work with hidden files too.
(Are your permissions correct)
Files extensions and associations are a windoze thing and don't matter in Linux.
...and it shouldn't make a difference either what the extension is.
Make sure your filename without an extension doesn't have a trailing dot
because it can make things tricky and work funny to the human point of view.
(especially coming from windoze world)
So, in Linux:
~/.applicationtempfile/.hiddendir/file
  is not the same as
~/.applicationtempfile/.hiddendir/file.   <==notice the trailing dot
but in some versions of windoze/DOS, the two are the same file.
It is especially true if you think the dot starts an extension (windoze)
or if you understand the dot is just another character in the filename (Linux)

Also, filenames and directories can be have spaces in their name.
So  'Hello .'  is a valid filename or directory name
and 'Hello . ' is valid too
and ' ' is also valid too
so is '                                             '  (45 spaces, all spaces)

How about this: (I'm doing this from memory..so it may be a little off on syntax)

TRY search = File.Load("~/.applicationtempfile/.hiddendir/file")
'and on the next line, print the error produced
PRINT Error.  <===put something from Error. statement to describe the exact error.

-Fernando



---------- Original Message -----------
From: "sundar j" <sundar_ima at ...251...>
To: "Jussi Lahtinen " <jussi.lahtinen at ...626...>
Cc: mailing list for gambas users  <gambas-user at lists.sourceforge.net>
Sent: 2 Apr 2012 01:05:37 -0000
Subject: Re: [Gambas-user] Load hidden file to variable?

> Ok. Ifound out the issue where it is. It seems to be associated with file 
> extension. The file i want to load does not have any extension. So I created the 
> same file with ".txt" extension inside the same hidden directory to see the 
> result. This time it loaded fine and did not have an issue. However my problem 
> remain same as gambas could not find the file without extension. How do I 
> overcome this?
> 
> From: Jussi Lahtinen <jussi.lahtinen at ...626...>
> Sent: Sat, 31 Mar 2012 21:33:31 
> To: sundar_ima at ...251..., mailing list for gambas users
<gambas-user at lists.sourceforge.net>
> Subject: Re: [Gambas-user] Load hidden file to variable?
> Why it doesn't work? It cannot find the file? Or does it give you error message?
> 
> Jussi
> 
> On Sat, Mar 31, 2012 at 18:36, sundar j <sundar_ima at ...251...> wrote:
> 
> I need to load file to a variable which is residing in side a hidden folder. So 
> i tried to load it like
> 
> If Exist("~/.applicationtempfile/.hiddendir/file") = True Then
> 
> search = File.Load("~/.applicationtempfile/.hiddendir/file")
> 
> ...
> 
> rest of coding
> 
> ...
> 
> However obove code does not work. Any help???
> 
> ------------------------------------------------------------------------------
> 
> This SF email is sponsosred by:
> 
> Try Windows Azure free for 90 days Click Here
> 
> http://p.sf.net/sfu/sfd2d-msazure
> 
> _______________________________________________
> 
> Gambas-user mailing list
> 
> Gambas-user at lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list