toolkit / com.sas.android.visualanalytics.sdk / FileHandler

FileHandler

interface FileHandler

A class through which all file I/O and operations are directed.

Since
8.30

Functions

delete

abstract fun delete(path: String): Unit

Deletes the file at the given path.

list

abstract fun list(dir: String): Array<String>

Returns the relative names of the files and directories in the given directory.

mkdirs

abstract fun mkdirs(dir: String): Unit

Creates the given directory if it does not already exist.

mkfile

abstract fun mkfile(path: String): Unit

Creates a file at the given path, creating any intermediate directories as necessary.

newFile

abstract fun newFile(parent: File, childPath: String): File
abstract fun newFile(parentPath: String, childPath: String): File

Instantiates a File object for the given child path in the given parent directory.

abstract fun newFile(path: String): File

Instantiates a File object for the given path.

openIn

abstract fun openIn(path: String): InputStream

Opens the file at the given path for reading.

openOut

abstract fun openOut(path: String): OutputStream

Opens the file at the given path for writing.

readStr

abstract fun readStr(path: String): String

Reads the file at the given path into a UTF-8-encoded string.

writeStr

abstract fun writeStr(contents: String, path: String): Unit

Writes the given UTF-8-encoded string into a file at the given path.

Copyright © 2018 by SAS Institute Inc., Cary, NC, USA. All Rights Reserved.