This function returns the size of a directory in bytes.

Usage

const res = toolkit.utils.getDirectorySize('path/to/directory');

Input Parameters

  • files: string | File[]: The path to the directory or an array of files.

Example

const res = toolkit.utils.getDirectorySize('path/to/directory');

console.log(res); // 2341341