Languages

Menu
Sites
Language
Resolving the filesystem of emulator returns 'Location not found'

I'm trying to play some music which is present in the filesystem of the emulator(/opt/media/opt/media/Sounds/file.mp3). But when I try to get a handle for the directory using the resolve method, it returns an error and prints the message as 'Location not found'. When I give the same location to the src attribute of an audio element in HTML5, it plays the music. Is the file system not accessible through the device API ? Please suggest a way to access the filesystem, if it is possible to do so.

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

9 Replies
Lakshmi Grandhi
I am looking into your issue, will get back to you
Lakshmi Grandhi
From Help, for sounds you must use music as virtual file https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.device.apireference%2Ftizen%2Ffilesystem.html The following virtual roots MUST be supported: images: the images location videos: the videos location music: the sounds location documents: the documents location downloads: the location for downloaded items wgt-package: the widget package location (read-only location) wgt-private: the widget private storage wgt-private-tmp: the widget private volatile storage area
Uday Bhaskar D
Hi Lakshmi, Thank you. I resolved my problem. The default virtual root for music was /opt/media/Sounds and I was testing my music in /opt/media/opt/media/Sounds/.
Sergey
I can't understand, where the virtual file system in my web project? Can you help?
Marco Buettner
You can not see the VFS on your project, because its only VIRTUAL. You see on your project the PHYSICAL FILE SYSTEM. But VFS and PFS are linked. If you add files and co on the *.html you can work with PFS, but when your will work directly with the file (read, write) you need the VFS.
Sergey
Thanks a lot for answer! If i want (i must) to work with proposed .txt file, how i can add or include him to my project to write and read?
Uday Bhaskar D
In the emulator, the default virtual root directories for images, videos, music, documents and downloads are under /opt/media/. I was able to locate these using the resolve directories example. May be u need to give the application the required permissions to read/write the filesystem or the content. You can do the same in the config.xml file under privileges tab.
Sergey
Yes, i know about privileges (http://goo.gl/CqoCf), thanx. I work with "documents". But where i can find /opt/media/ ? I run application on Web Simulator. Where i can find virtual root configuations on simulator? Thanx again! PS: on windows.
Sergey
One more problem. when I try to delete a file I get еру message "The type of an object is incompatible with the expected type of the parameter associated to the object." I do it like on example: https://developer.tizen.org/documentation/how-access-tizen-file-system