Package com.suparnatural.core.fs

Types

ContentEncoding
Link copied to clipboard
common

Supported Types of file content encodings

enum ContentEncoding : Enum<ContentEncoding>
FileSystem
Link copied to clipboard

A thread safe singleton to access file system apis.

Examples

val documentsDirectory = FileSystem.contentsDirectory

val isFileCreated = FileSystem.touch(documentsDirectory.absolutePath?.byAppending("test.txt")!!)

common
object FileSystem
object FileSystem
object FileSystem
FileSystemAndroidTests
Link copied to clipboard
common
class FileSystemAndroidTests
class FileSystemAndroidTests
FileSystemProvider
Link copied to clipboard
android

Provider for File System. Automatically initializes the library with the context.

class FileSystemProvider
FileType
Link copied to clipboard
common

Type of a file

enum FileType : Enum<FileType>
Path
Link copied to clipboard

Represents a file system path to a resource

common
class Path
ios
class Path
PathComponent
Link copied to clipboard

A Path is made up of PathComponents. For example, a path has Path.absolutePath and Path.relativePath which are both PathComponents.

common
class PathComponent(component: String?)
ios
class PathComponent(component: String?)
StatResult
Link copied to clipboard
common

Stats for a file with name as name.

data class StatResult(name: String, absolutePath: PathComponent, canonicalPath: PathComponent, createdAt: Double?, modifiedAt: Double?, size: Double?, type: FileType)

Functions

fromData
Link copied to clipboard
ios
fun String.Companion.fromData(data: <ERROR CLASS>, encoding: ContentEncoding): String?
toByteArray
Link copied to clipboard
ios
fun <ERROR CLASS>.toByteArray(): ByteArray?
toData
Link copied to clipboard
ios
fun String.toData(encoding: ContentEncoding): <ERROR CLASS>?
toNSData
Link copied to clipboard
ios
fun ByteArray.toNSData(): <ERROR CLASS>?

Properties

nativeStr
Link copied to clipboard
ios
val String.nativeStr: <ERROR CLASS>