This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Where does an program look for the connector object with file?  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I am using the below statement:

conn = (StreamConnection)Connector.open("file:/Stats.txt");

in what directory does the stats.txt need to be placed in?
Could you define how this works; that is what are the rules for locating a file?

Thanks in Advance.
 
Bartender
Posts: 19182
85
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mobile devices are not PCs, so they're not obligated to have file systems. Often they do, but there's no standard and there may not be support for directories.

In the case of your example, the "/" means at the root of the file system (or at least Java's view of it), which would generally work even if there is no directory support.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!