• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Charlie Swan
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.
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
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