S60里的系统属性

http://www.forum.nokia.com/document/Java_ME_Developers_Library_v1/index.html?content=GUID-545CA84A-8378-4DFA-9035-94479F5BE26E.html

一些常用的路径,比如图像路径,存储卡路径,相机路径

 System properties

The table below contains the File API system properties that return the localized names of common directories and the URLs to the most common directories. Several Strings are only supported in either S60 or Series 40. Refer to the individual tables for each implementation.

String Description
Fileconn.dir.photos.name Localized name for the photo directory, for example “Images“.
Fileconn.dir.graphics.name Localized name for the graphic directory, for example “Graphic clips“.
Fileconn.dir.music.name Localized name for the music directory, for example “Music clips“.
Fileconn.dir.memorycard.name Localized UI name for the memory card of directory, for example “Memory card“.
Fileconn.dir.photos The URL of the default storage directory for photos captured with the integrated camera and other images. For example, “file:///c:/My files/Images/“.
Fileconn.dir.graphics The URL of the default storage directory for clip art graphics (caller group icons, background pictures, and other similar items). For example, “file:///c:/My files/Graphic clips/“.
Fileconn.dir.music The URL of the default storage directory for music files (MP3, AAC, and others). For example, “file:///c:/My files/Music clips/“.
Fileconn.dir.memorycard Root directory of memory card. For example, “file:///e:/“.

Example for S60:

String url = System.getProperty("fileconn.dir.photos") + "myImage.jpg";

The Content of the URL is file:///c:/data/Images/myImage.jpg

String Description
Fileconn.dir.photos.name Localized name for the photo directory, for example “Images“.
Fileconn.dir.graphics.name Localized name for the graphic directory, for example “Graphic clips“.
Fileconn.dir.music.name Localized name for the music directory, for example “Music clips“.
Fileconn.dir.memorycard.name Localized UI name for the memory card of directory, for example “Memory card“.
Fileconn.dir.photos The URL of the default storage directory for photos captured with the integrated camera and other images. “file:///C:/predefgallery/predefphotos“.
Fileconn.dir.graphics The URL of the default storage directory for clip art graphics (caller group icons, background pictures, and other similar items). “file:///C:/predefgallery/predefgraphics“.
Fileconn.dir.music The URL of the default storage directory for music files (MP3, AAC, and others). “file:///C:/predefgallery/predefmusic“.
Fileconn.dir.themes The URL of the default storage directory for themes. “file:///C:/predefgallery/predefthemes

Example for Series 40:

String url = System.getProperty("fileconn.dir.photos") + "myImage.jpg";

The Content of the URL is file:///C:/predefgallery/predefphotos/myimage.jpg

Comments are closed.