It is currently Tue May 23, 2017 9:51 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Writing to the "/source" folder
Unread postPosted: Thu Apr 27, 2017 1:51 am 
Offline

Joined: Mon Apr 24, 2017 9:12 pm
Posts: 30
Location: Melbourne, Australia
I have a socket client (the server is Win10) that tries to send an "xxx.bas" file to the rfo-basic/source folder:
Code:
filename$ = "/sdcard/rfo-basic/source/xxx.bas"
ip$       = "192.168.0.3"
port      =  40002
socket.client.connect ip$, port
print "Connected"
maxclock = clock() + 30000
do
    socket.client.read.ready flag
    if clock() > maxclock
        print "Process timed out. Ending."
        end
    endif
until flag
byte.open W, fw, filename$
socket.client.read.file fw
byte.close fw
socket.client.close
print "Done"

I get the following error: Inval;id File Number at socket.client.read.filefw

If I set filenname$ - 'xxx.bas' then it works OK, but writes it into the data folder.

Can someone help me to be able to write to the source folder ?

_________________
Stanton's law: When things can not go wrong, they will still go wrong...


Report this post
Top
 Profile  
 
 Post subject: Re: Writing to the "/source" folder
Unread postPosted: Thu Apr 27, 2017 2:25 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
all paths are relative to "sdcard/rfo-basic/data"

replace "/sdcard/rfo-basic/source/xxx.bas" with "../source/xxx.bas"

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Writing to the "/source" folder
Unread postPosted: Thu Apr 27, 2017 5:06 pm 
Offline

Joined: Mon Apr 24, 2017 9:12 pm
Posts: 30
Location: Melbourne, Australia
Thank You ! It worked..

_________________
Stanton's law: When things can not go wrong, they will still go wrong...


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred