Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Sep 21, 2018 6:38 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SpecialFolder Help
PostPosted: Mon Apr 15, 2013 6:15 am 
Offline

Joined: Fri Nov 18, 2005 7:26 pm
Posts: 63
I am wanting to create a folder in the Application data folder and but wanted it to be in a subfolder such a AppName\Database. I have tried this approach but it does not work, what should I use to have it in

ApplicationData\Appname\Database\database.db




db_file = SpecialFolder.Desktop.Child("Appname\database").Child("database.db")  or
db_file = SpecialFolder.ApplicationData.Child("Appname\database").Child("database.db")


Top
 Profile  
Reply with quote  
 Post subject: Re: SpecialFolder Help
PostPosted: Mon Apr 15, 2013 8:05 am 
Offline

Joined: Fri Nov 18, 2005 7:26 pm
Posts: 63
Ok I have figured this out . I need to have an extra .Child.. I have done this


db_file = SpecialFolder.ApplicationData.Child("APPName").child("DB").Child("database.db")


this seems to work ok


Top
 Profile  
Reply with quote  
 Post subject: Re: SpecialFolder Help
PostPosted: Wed Apr 17, 2013 8:45 am 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
CAUTION: If the "AppName" or the "DB" folders do not exist, your code will return NIL and may not function as you expect. Better to check the existence of every folder in the chain and create it if it doesn't exist.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group