To manage application data, you can use the Filesystem API to access parts of the file system.
Accessible parts of the TV file system are represented as virtual root locations. The following are examples of virtual root locations:
"documents"
Directory for text documents in formats, such as DOC and TXT. Files in this directory are not removed when the application is uninstalled.
"wgt-package"
Read-only directory for application packages.
"wgt-private"
Private directory for application content. Files in this directory are removed when the application is uninstalled.
"wgt-private-tmp"
Temporary private directory for application content. Files in this directory are removed when the application is terminated or the Web runtime is restarted.
For information on how to manage removable storages on the device, see Handling USB Storages.
NoteIf you want to store less than 5 MB of data, use the Web storage.
Prerequisites
To use the Filesystem API, the application has to request permission by adding the following privileges to the "config.xml" file:
The file handle is returned in the success event handler, and is a reference object that points to and represents a file or directory.
To create files and directories:
To create a directory within the file system, use the createDirectory() method.
The directory is created relative to the current directory where the operation is performed.
if (documents_obj) {
documents_obj.createDirectory('sampleDir');
}
Samsung Electronics, and its partners, use cookies and similar technologies
(collectively “technologies”) to store and access information on your device. Some of
these technologies are technically essential to provide you with a secure,
well-functioning and reliable website. We would also like to set
optional/non-essential technologies to give you the best user experience. Optional
technologies make it possible to measure the audience of our website, to display
personalized advertising on third-party sites based on your profile, to track your
location, to carry out targeted marketing campaigns and to personalize the content of
our website depending on your usage. Through these technologies, we will collect
information such as your interaction with our website, your preferences and your
browsing habits.
If you are happy for technologies to be used for these purposes, click on "Accept All"
to accept all of the technologies. Alternatively, you may click "Continue without
accepting" to refuse all non-essential technologies. You can also make a choice by
category by clicking "Configure". You can withdraw your consent and modify your
choices at any time by clicking on the "Cookie Preferences" button located at the
bottom of our website. Further information is also available in
our Cookie Policy and our
Privacy Policy.
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.