size

object size extends Path => Long

Gets the size of the given file or folder

Throws an exception if the file or folder does not exist

When called on folders, returns the size of the folder metadata (i.e. the list of children names), and not the size of the folder's recursive contents. Use os.walk if you want to sum up the total size of a directory tree.

trait Path => Long
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(p: Path): Long

Inherited methods

@unspecialized
def andThen[A](g: Long => A): Path => A
Inherited from
Function1
@unspecialized
def compose[A](g: A => Path): A => Long
Inherited from
Function1
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from
Function1