Question: Write a program in java langauge to calculate the total size ( in bytes, no text or commas, just the integer answer ) of all
Write a program in java langauge to calculate the total size in bytes, no
text
or commas, just the integer answer of all files in the current directory
folder and all subfolders. Your code must include a recursive function
written and called by the student. Follow the pseudo code exactly.
PSEUDOCODE
int main
long total
print dirspace
dirspacetargetDir
long sum ;
for every entry in targetDir
if entry is a file
sum size of entry
if entry is a dir and or ;
sum dirspaceentry
return sum
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
