list

os.list
object list extends Path => IndexedSeq[Path]

Returns all the files and folders directly within the given folder. If the given path is not a folder, raises an error. Can be called with list.stream to return an iterator. To list files recursively, use walk

For convenience os.list sorts the entries in the folder before returning them. You can disable sorted by passing in the flag sort = false.

Attributes

Graph
Supertypes
trait Path => IndexedSeq[Path]
class Object
trait Matchable
class Any
Self type
list.type

Members list

Type members

Classlikes

object stream extends Path => Generator[Path]

Similar to os.list], except provides a os.Generator of results rather than accumulating all of them in memory. Useful if the result set is large.

Similar to os.list], except provides a os.Generator of results rather than accumulating all of them in memory. Useful if the result set is large.

Attributes

Supertypes
trait Path => Generator[Path]
class Object
trait Matchable
class Any
Self type
stream.type

Value members

Concrete methods

def apply(src: Path, sort: Boolean): IndexedSeq[Path]
def apply(src: Path): IndexedSeq[Path]

Inherited methods

def andThen[A](g: IndexedSeq[Path] => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => Path): A => R

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1