# FileSorting

enum FileSorting : Sorting<File> , Enum<FileSorting>

Criterion to sort files by.

#### Parameters

sort

lambda that sorts a sequence of files

#### See also

listFiles

## Entries

NONE
Link copied to clipboard
NONE

No sorting is applied.

NAME
Link copied to clipboard
NAME

Files are sorted by name.

LAST_MODIFIED
Link copied to clipboard
LAST_MODIFIED

Files are sorted by last modified date.

## Properties

entries
Link copied to clipboard
val entries: EnumEntries<FileSorting>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int
sort
Link copied to clipboard
open override val sort: (Sequence<File>, Ordering) -> Sequence<File>

## Functions

valueOf
Link copied to clipboard
fun valueOf(value: String): FileSorting

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
fun values(): Array<FileSorting>

Returns an array containing the constants of this enum type, in the order they're declared.