getFileSystem

Get a FileSystem API object exposing safe file operations

import { getFileSystem } from "@roku-sdk/runtime/file-system";
getFileSystem(): Promise<FileSystemInternal | null>

Description

Get a FileSystem API object exposing safe file operations.

This wraps the runtime file system instance to only provide the approved method set that is safe for consumer use.

Return values

Promise resolved with FileSystemInternal wrapper object.

Types

FileSystemInternal

Safe interface for file system access exposed to app code.

This intentionally excludes internal runtime-only methods such as setStorageDeviceChangeHandler to enforce a safer operation surface.

type FileSystemInternal = Omit<FileSystem, "setStorageDeviceChangeHandler" | "apiVersion">;

What’s Next

Did this page help you?