[Gambas-user] Strange behaviour of File.Read

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Jun 21 21:54:31 CEST 2017


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 <jussi.lahtinen at ...626...>
wrote:

> 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...
>
>
>
> Jussi
>
>
>
>
>
> On Wed, Jun 21, 2017 at 4:36 PM, bill-lancaster via Gambas-user <
> gambas-user at lists.sourceforge.net> 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/PhotoFolder.txt")
>>   Print s
>>   Print IsDir(s)
>>   Print IsDir("/home/bill/Pictures/Family/Visits/2000-07-29")
>> End
>>
>> This is the output:-
>>
>> "/home/bill/Pictures/Family/Visits/2000-07-29"
>>
>> False
>> True
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://gambas.8142.n7.nabble.c
>> om/Strange-behaviour-of-File-Read-tp59467.html
>> Sent from the gambas-user mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>



More information about the User mailing list