file systems modern operating systems define file-system directories (which are also sometimes called "folders"in recursive way namelya file system consists of top-level directoryand the contents of this directory consists of files and other directorieswhich in turn can contain files and other directoriesand so on the operating system allows directories to be nested arbitrarily deep (as long as there is enough space in memory)although there must necessarily be some base directories that contain only filesnot further subdirectories representation of portion of such file system is given in figure /user/rt/coursescs cs grades homeworkshw hw hw programspr pr projectspr papersbuylow sellhigh grades demosmarket figure portion of file system demonstrating nested organization given the recursive nature of the file-system representationit should not come as surprise that many common behaviors of an operating systemsuch as copying directory or deleting directoryare implemented with recursive algorithms in this sectionwe consider one such algorithmcomputing the total disk usage for all files and directories nested within particular directory for illustrationfigure portrays the disk space being used by all entries in our sample file system we differentiate between the immediate disk space used by each entry and the cumulative disk space used by that entry and all nested features for examplethe cs directory uses only of immediate spacebut total of of cumulative space