FileFactory

object FileFactory: Any

The factory responsible for obtaining the desired File wrapped by its programming language wrapper determined by the file extension.

Methods

invoke

operator fun invoke(pathname: String): PlumeFile

Creates a File given the pathname.

Parameters

Name Description
pathname: String

The path at which the file resides.

ReturnValue

Name Description
PlumeFile

A File object if not one of the supported file types or a supported file type such as JavaFile.

invoke

operator fun invoke(f: File): PlumeFile

Creates a File given the pathname.

Parameters

Name Description
f: File

A generic File pointer for the file to cast.

ReturnValue

Name Description
PlumeFile

A File object if not one of the supported file types or a supported file type such as JavaFile.

getFileHash

fun getFileHash(f: File): Int

Will ingest a file's contents and return the xxHash32 representation. See xxHash for more information.

Parameters

Name Description
f: File

The file to hash.

ReturnValue

Name Description
Int

The given file's xxHash32 representation