nx.js
NamespacesSwitchClasses

Album

The Switch.Album class allows for interacting with the Switch's photo gallery, providing access to the screenshots / video recordings that the user has saved.

It is a Set subclass, which contains entries of Switch.AlbumFile instances.

Example

import { CapsAlbumStorage } from '@nx.js/constants';
 
const album = new Switch.Album(CapsAlbumStorage.Sd);
for (const file of album) {
  console.log(file);
}

Extends

Constructors

new Album()

new Album(storage): Album

Parameters

ParameterType
storagenumber

Returns

Album

Overrides

Set<AlbumFile>.constructor

Properties

PropertyModifierTypeDescriptionInherited from
[toStringTag]readonlystring-Set.[toStringTag]
sizereadonlynumberSet.size
storagereadonlynumber--
[species]readonlySetConstructor-Set.[species]

Methods

[iterator]()

[iterator](): IterableIterator<AlbumFile>

Returns

IterableIterator<AlbumFile>

Overrides

Set.[iterator]


add()

add(value): this

Appends a new element with a specified value to the end of the Set.

Parameters

ParameterType
valueAlbumFile

Returns

this

Inherited from

Set.add


clear()

clear(): void

Returns

void

Inherited from

Set.clear


delete()

delete(value): boolean

Removes a specified value from the Set.

Parameters

ParameterType
valueAlbumFile

Returns

boolean

Returns true if an element in the Set existed and has been removed, or false if the element does not exist.

Inherited from

Set.delete


entries()

entries(): IterableIterator<[AlbumFile, AlbumFile]>

Returns

IterableIterator<[AlbumFile, AlbumFile]>

Overrides

Set.entries


forEach()

forEach(callbackfn, thisArg?): void

Executes a provided function once per each value in the Set object, in insertion order.

Parameters

ParameterType
callbackfn(value, value2, set) => void
thisArg?any

Returns

void

Inherited from

Set.forEach


has()

has(value): boolean

Parameters

ParameterType
valueAlbumFile

Returns

boolean

a boolean indicating whether an element with the specified value exists in the Set or not.

Inherited from

Set.has


keys()

keys(): IterableIterator<AlbumFile>

Returns

IterableIterator<AlbumFile>

Overrides

Set.keys


values()

values(): IterableIterator<AlbumFile>

Returns

IterableIterator<AlbumFile>

Overrides

Set.values

On this page