Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Old path when DEMO 2.14 Strategy accesses to local disk
 Post subject: Old path when DEMO 2.14 Strategy accesses to local disk Post rating: 0   New post Posted: Sat 11 Feb, 2012, 10:53 
User avatar

User rating: 2
Joined: Tue 16 Aug, 2011, 19:01
Posts: 70
Location: ItalyItaly
Hi Support,
with DEMO 2.13 the following code


File dir = this.context.getFilesDir();
String path = dir.getAbsolutePath();
print(path);


returns this path:

Quote:
C:\Users\fra\Documents\JForex\Strategies\files


but the same code with DEMO 2.14 returns the following different path

Quote:
C:\Users\fra\Documents\JForex\files



how can I set in DEMO 2.14 the old path that DEMO 2.13 produced ?


Best regards,
Frank


 
 Post subject: Re: Old path when DEMO 2.14 Strategy accesses to local disk Post rating: 0   New post Posted: Mon 13 Feb, 2012, 09:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Frank_ wrote:
how can I set in DEMO 2.14 the old path that DEMO 2.13 produced ?
You can't set this through API. If you need the particular path pattern, then consider adjusting the path by using string operations.


 
 Post subject: Re: Old path when DEMO 2.14 Strategy accesses to local disk Post rating: 0   New post Posted: Mon 13 Feb, 2012, 11:39 
User avatar

User rating: 2
Joined: Tue 16 Aug, 2011, 19:01
Posts: 70
Location: ItalyItaly
Please could you explain how I can set the following path ?

Quote:
C:\Users\fra\Documents\JForex\Strategies\files


Best regards,
Frank


 
 Post subject: Re: Old path when DEMO 2.14 Strategy accesses to local disk Post rating: 0   New post Posted: Mon 13 Feb, 2012, 11:58 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Use this File constructor:
https://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#File(java.lang.String)
For example:
File dir = new File("C:\\Users\\fra\\Documents\\JForex\\Strategies\\files");
Note that the usage of this directory will require usage of the @RequiresFullAccess annotation.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com