as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
The Vega File System API provides support for enabling file system querying, traversing, reading, and writing operations.

Remarks

Apps operate in a sandboxed environment with a restricted view of the device file system. Vega makes the following app-specific directories available in the sandbox.

Get started

Setup

  1. Add the following library dependency to the dependencies section of your package.json file.
  1. Regenerate the package-lock.json file using the npm install command.

Usage

The following examples use async/await to handle Promises returned by FileSystem methods. This pattern provides a cleaner way to work with asynchronous operations.

Open a file

This example uses async/await to handle the Promise returned by FileSystem.openFile().

Remove a file

This example uses async/await to handle the Promise returned by FileSystem.removeFile().

Remove a directory

This example uses async/await to handle the Promise returned by FileSystem.removeDir().

Remove a directory recursively

This example uses async/await to handle the Promise returned by FileSystem.removeDirAll().

Read a file as a string

This example uses async/await to handle the Promise returned by FileSystem.readFileAsString().

Write a string to a file

This example uses async/await to handle the Promise returned by FileSystem.writeStringToFile().

Access file metadata

This example uses async/await to handle the Promise returned by FileSystem.getMetadata().

Access directory entries

This example uses async/await to handle the Promise returned by FileSystem.getEntries().

API Reference

Interfaces


最終更新日 2026年7月22日