Show / Hide Table of Contents

Class FileSizeHelper

Helper class for efficiently getting the complete size of a file or directory.

Inheritance
java.lang.Object
FileSizeHelper
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Namespace:
Assembly: .dll
Syntax
public final class FileSizeHelper

Constructors

FileSizeHelper()

Declaration
public FileSizeHelper()

Methods

size(Path path)

Attempts to calculate the size of a file or directory. Since the operation is non-atomic, the returned value may be inaccurate. However, this method is quick and does its best.

Declaration
public static final long size(Path path)
Parameters
Type Name Description
java.nio.file.Path path

The path for which to get the size

Returns
Type Description
long

The size on the drive in bytes

In This Article
Back to top Generated by DocFX