Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Functions
disk_usage.cpp File Reference
#include <cstdlib>
#include <filesystem>
#include <iostream>
Include dependency graph for disk_usage.cpp:

Functions

long disk_usage (directory_entry entry)
 
int main (int argc, char *argv[])
 

Function Documentation

◆ disk_usage()

long disk_usage ( directory_entry  entry)

Calculates the total disk usage (in bytes) of the portion of the file system rooted at the given entry, while printing a summary akin to the standard 'du' Unix tool.

Parameters
adirectory_entry denoting the relevant portion of the file system
Returns
total number of bytes used by the designated portion of the file system
Here is the call graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)
Here is the call graph for this function: