The directory string was written from a directory chooser, originally via a
string variable - this is where the quotes came from.
Using a variant produces a string without quotes and presumably without \n
Thanks again
--
View this message in context:
http://gambas.8142.n7.nabble.com/Strange-beh
Perhaps more clear this way, maybe your file contains line:
"/home/bill/Pictures/Family/Visits/2000-07-29" instead of
/home/bill/Pictures/Family/Visits/2000-07-29 .
So, the quote marks shouldn't be there...
Jussi
On Wed, Jun 21, 2017 at 10:47 PM, Jussi Lahtinen
wrote:
> Is that the literal outp
Is that the literal output?
Because if there really are quote marks, then the command is equal to:
Print IsDir("\"/home/bill/Pictures/Family/Visits/2000-07-29\"")
Which is clearly false.
However if it is not literal output, then it is impossible to say what is
read from the file to the string...
Thanks so much for the insight.
IsDir(Trim(s)) still produced False, but I tried saving the path with a
Variant instead of a string and now I get True
Thanks again
--
View this message in context:
http://gambas.8142.n7.nabble.com/Strange-behaviour-of-File-Read-tp59467p59481.html
Sent from the
bill-lancaster wrote
> I must be missing something - any ideas
Try changing the line
*Print IsDir(s) *
to
*Print IsDir(Trim(s)) *
It worked for me.
-
Check out www.gambas.one
--
View this message in context:
http://gambas.8142.n7.nabble.com/Strange-behaviour-of-File-Read-tp59467p59479
On Wed, 21 Jun 2017 06:36:01 -0700 (MST)
bill-lancaster via Gambas-user wrote:
> I must be missing something - any ideas?
> Gambas3.9.2
> Components, gb.form, gb,gui, gb.image
>
> This is the code:-
>
> Public Sub Button1_Click()
> Dim s As String
> s = File.Load(User.Home &/ "Pictures/PhotoF
I must be missing something - any ideas?
Gambas3.9.2
Components, gb.form, gb,gui, gb.image
This is the code:-
Public Sub Button1_Click()
Dim s As String
s = File.Load(User.Home &/ "Pictures/PhotoFolder.txt")
Print s
Print IsDir(s)
Print IsDir("/home/bill/Pictures/Family/Visits/2000-07-29"