Skip to main content
Klyx provides a unified file system API. The KxFile class is a pure data model representing a file or directory, while the FileSystem service provides all I/O operations through URI-based methods. This design abstracts over Android’s Storage Access Framework (SAF) and local file system access.

KxFile

KxFile is a data class that wraps a URI and provides file metadata. It does not perform I/O directly — use the FileSystem service for read/write operations.

Creating KxFile instances

KxFile properties

FileSystem service

The FileSystem service provides all file operations. Access it with:

Listing and navigating

Reading files

Writing files

File operations

File metadata

Protected paths

Directory size calculation

FileCategory

An enum describing how a file should be handled:

FileCapabilities

A data class describing allowed operations:

FileStatInfo

A data class with detailed Unix-like file statistics:

Paths utility

Paths is an object providing common Android and Klyx-specific directory paths:

Klyx-specific path extensions

Terminal native libraries

File utility functions

Example

A file system demo screen demonstrates:
  • Listing directory contents and showing file properties
  • Determining file categories with determineFileCategory
  • Checking file capabilities with capabilities
  • Formatting file sizes with humanBytes()
  • Searching files with search
  • Accessing Paths directories and terminal paths