Members
(constant) fs
Copyright (c) 2022 BlackBerry Limited. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
resolveLocalFileSystemURL
Look up file system Entry referred to by local URI.
Methods
_capture((DOMString}, successCB, errorCB, options)
Launches a capture of different types.
Parameters:
Name | Type | Description |
---|---|---|
(DOMString} |
type | |
successCB |
function | |
errorCB |
function | |
options |
CaptureVideoOptions |
Capture()
The Capture interface exposes an interface to the camera and microphone of the hosting device.
CaptureAudioOptions()
Encapsulates all audio capture operation configuration options.
CaptureError()
The CaptureError interface encapsulates all errors in the Capture API.
CaptureImageOptions()
Encapsulates all image capture operation configuration options.
CaptureVideoOptions()
Encapsulates all video capture operation configuration options.
ConfigurationData()
Encapsulates a set of parameters that the capture device supports.
DirectoryEntry()
An interface representing a directory on the file system.
{boolean} isFile always false (readonly)
{boolean} isDirectory always true (readonly)
{DOMString} name of the directory, excluding the path leading to it (readonly)
{DOMString} fullPath the absolute full path to the directory (readonly)
{FileSystem} filesystem on which the directory resides (readonly)
DirectoryReader()
An interface that lists the files and directories in a directory.
Entry(isFile, isDirectory, name, fullPath, fileSystem, nativeURL)
Represents a file or directory on the local file system.
Parameters:
Name | Type | Description |
---|---|---|
isFile |
boolean | true if Entry is a file (readonly) |
isDirectory |
boolean | true if Entry is a directory (readonly) |
name |
DOMString | name of the file or directory, excluding the path leading to it (readonly) |
fullPath |
DOMString | the absolute full path to the file or directory (readonly) |
fileSystem |
FileSystem | the filesystem on which this entry resides (readonly) |
nativeURL |
DOMString | an alternate URL which can be used by native webview controls, for example media players. (optional, readonly) |
File()
Constructor.
name {DOMString} name of the file, without path information
fullPath {DOMString} the full path of the file, including the name
type {DOMString} mime type
lastModifiedDate {Date} last modified date
size {Number} size of the file in bytes
FileEntry()
An interface representing a file on the file system.
{boolean} isFile always true (readonly)
{boolean} isDirectory always false (readonly)
{DOMString} name of the file, excluding the path leading to it (readonly)
{DOMString} fullPath the absolute full path to the file (readonly)
{FileSystem} filesystem on which the file resides (readonly)
FileError()
FileError
Flags(create, exclusive)
Supplies arguments to methods that lookup or create files and directories.
Parameters:
Name | Type | Description |
---|---|---|
create |
boolean | file or directory if it doesn't exist |
exclusive |
boolean | used with create; if true the command will fail if target path exists |
MediaFile()
Represents a single file.
name {DOMString} name of the file, without path information
fullPath {DOMString} the full path of the file, including the name
type {DOMString} mime type
lastModifiedDate {Date} last modified date
size {Number} size of the file in bytes
MediaFileData(codecs, bitrate, height, width, duration)
MediaFileData encapsulates format information of a media file.
Parameters:
Name | Type | Description |
---|---|---|
codecs |
DOMString | |
bitrate |
long | |
height |
long | |
width |
long | |
duration |
float |
Metadata()
Information about the state of the file or directory
{Date} modificationTime (readonly)
readFailureCallback()
Callback used by the following read* functions to handle errors.
Must be bound to the FileReader's this, e.g. readFailureCallback.bind(this)
readSuccessCallback(readType, encoding, offset, totalSize, accumulate, r)
Callback used by the following read* functions to handle incremental or final success.
Must be bound to the FileReader's this along with all but the last parameter,
e.g. readSuccessCallback.bind(this, "readAsText", "UTF-8", offset, totalSize, accumulate)
Parameters:
Name | Type | Description |
---|---|---|
readType |
The name of the read function to call. | |
encoding |
Text encoding, or null if this is not a text type read. | |
offset |
Starting offset of the read. | |
totalSize |
Total number of bytes or chars to read. | |
accumulate |
A function that takes the callback result and accumulates it in this._result. | |
r |
Callback result returned by the last read exec() call, or null to begin reading. |