Question: Please solve this question by MATLAB code. 10.10 Calculating Directory Sizes Function dir returns the contents of a specified directory. The dir command returns a
Please solve this question by MATLAB code.
10.10 Calculating Directory Sizes Function dir returns the contents of a specified directory. The dir command returns a structure array with four fields, as shown below: ddir ('chap10') 36x1 struct array with fields: name date bytes isdir The name field contains the names of each file, date contains the last modifi cation date for the file, bytes contains the size of the file in bytes, and isdir is 0 for conventional files and 1 for directories. Write a function that acceptsa directory name and path and returns the total size of all files in the directory, in bytes. 10.10 Calculating Directory Sizes Function dir returns the contents of a specified directory. The dir command returns a structure array with four fields, as shown below: ddir ('chap10') 36x1 struct array with fields: name date bytes isdir The name field contains the names of each file, date contains the last modifi cation date for the file, bytes contains the size of the file in bytes, and isdir is 0 for conventional files and 1 for directories. Write a function that acceptsa directory name and path and returns the total size of all files in the directory, in bytes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
