Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
SdlFile

SdlFile Class Reference

Constructors

Instance Methods

Constructors

new SdlFile(fileName, fileType, data, persistentFile)

Creates a new instance of SdlFile

Instance Methods

sdlFile.clone() ⇒ ChoiceCell

Creates a deep copy of the object

Kind: Instance method of SdlFile
Returns: ChoiceCell - A deep copy of the object

sdlFile.equals(other) ⇒ Boolean

Checks whether two SdlFiles can be considered equivalent

Kind: Instance method of SdlFile
Returns: Boolean - Whether the objects are the same or not

ParamTypeDescription
other SdlFile The object to compare

sdlFile.getFileData() ⇒ Uint8Array

Gets the byte array that represents the content of the file

Kind: Instance method of SdlFile
Returns: Uint8Array - a byte array representing the data of the file

sdlFile.getFilePath() ⇒ String

Gets the location of the file

Kind: Instance method of SdlFile
Returns: String - The path of the file.

sdlFile.getName() ⇒ String

Gets the name of the file

Kind: Instance method of SdlFile
Returns: String - a String value representing the name that will be used to store the file in the head unit

sdlFile.getOverwrite() ⇒ Boolean

Gets the overwrite property for an SdlFile

Kind: Instance method of SdlFile
Returns: Boolean - A boolean value that indicates if the file can be overwritten

sdlFile.getType() ⇒ FileType

Gets the type of the file

Kind: Instance method of SdlFile
Returns: FileType - a FileType enum value representing the type of the file

sdlFile.isPersistent() ⇒ Boolean

Gets whether the file should persist between sessions / ignition cycles

Kind: Instance method of SdlFile
Returns: Boolean - a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

sdlFile.isStaticIcon() ⇒ Boolean

Gets the name of the static file. Static files comes pre-shipped with the head unit

Kind: Instance method of SdlFile
Returns: Boolean - a StaticIconName enum value representing the name of a static file that comes pre-shipped with the head unit

sdlFile.setFileData(data) ⇒ SdlFile

Sets the byte array that represents the content of the file

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
data Uint8Array a byte array representing the data of the file

sdlFile.setFilePath(filePath) ⇒ SdlFile

Sets the location of the file

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
filePath String a String value representing the location of the file

sdlFile.setName(fileName) ⇒ SdlFile

Sets the name of the file

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
fileName String a String value representing the name that will be used to store the file in the head unit

sdlFile.setOverwrite(overwrite) ⇒ SdlFile

Sets the overwrite property for an SdlFile

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining

ParamTypeDescription
overwrite Boolean A boolean value that indicates if the file can be overwritten

sdlFile.setPersistent(persistentFile) ⇒ SdlFile

Sets whether the file should persist between sessions / ignition cycles

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
persistentFile Boolean a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

sdlFile.setStaticIcon(staticIcon) ⇒ SdlFile

Sets the name of the static file. Static files comes pre-shipped with the head unit

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
staticIcon Boolean a StaticIconName enum value representing the name of a static file that comes pre-shipped with the head unit

sdlFile.setType(fileType) ⇒ SdlFile

Sets the type of the file

Kind: Instance method of SdlFile
Returns: SdlFile - A reference to this instance to support method chaining.

ParamTypeDescription
fileType FileType a FileType enum value representing the type of the file
View on GitHub.com
Previous Section Next Section