It is currently Fri May 26, 2017 7:29 pm



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: Pros and Cons of Absolute File Paths
Unread postPosted: Fri Mar 17, 2017 7:14 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 327
Hi all,

Marc intend to use no absolute paths in BASIC! except in special places where someone can prove that it is necessary.
We can also read what Marc wrote in the v01.91 manual in "Paths explained".

You can try the example at http://rfobasic.freeforums.org/post35749.html?hilit=#p35749.
But read the article about Android internal and external file folders.


Cons of Absolute File Paths

* Not for BASIC! beginners

Pros of Absolute File Paths

* Sooner or later you have to deal with absolute file paths, especially if you use external activities.
* Access to removable SD cards
* Using internal directories upon external directories or on removeable SD cards.
* I think this is not beginner code. /../../../../emulated/0/myDirectory
* If you simplify the calling of a special path, so it is an easy task to handle absolute paths.

We need more arguments for Cons of Absolute File Paths.
Who can help?

/Gregor


Report this post
Top
 Profile  
 
 Post subject: Re: Pros and Cons of Absolute File Paths
Unread postPosted: Wed May 03, 2017 6:23 pm 
Offline

Joined: Mon Aug 08, 2016 12:36 pm
Posts: 6
I have two cons of absolute file paths. One is that there is more than one potential path to the same place, and it varies from device to device. My internal memory path is /storage/emulated/0/ and my sd card is /mnt/media_rw/external_SD. And the other con might be a bug for me, but in the Preferences > Select New Base Drive I can choose my SD card but when I restart it it says this:
Code:
!!

BASIC! is unable to write
its sample programs.
You can write and run
programs, but you cannot
save them. You can press
Menu->More->Preferences
and select "Base Drive"
to change the setting
to writable storage.

!!


Report this post
Top
 Profile  
 
 Post subject: Re: Pros and Cons of Absolute File Paths
Unread postPosted: Thu May 04, 2017 7:59 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 327
Hi Soulfigther,

Under
https://github.com/RFO-BASIC/Basic/files/876323/OliBasicXVII.zip
you can find a description for my test version.

There is an article about file handling and folder permissions starting at page 13.

I think it is a misunderstanding.
pro: Absolute file paths like file:///emulated/0/myDirectory
Supported only in my test version

con: Relative file paths like /../../../../emulated/0/myDirectory
Supported in the main version and in my test version

Happy coding
Gregor


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 1 guest


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