Get the size of the directory

xiaoxiao2021-03-06  108

Public Static Long Dirsize (DirectoryInfo D) {long size = 0; // add file sizes. fileinfo [] FIS = D.GetFiles (); foreach (fileInfo fi in fis) {size = fi.length;} // add Subdirectory Sizes. DIRECTORYINFO [] DIS = d.getdirector (); foreach (directoryInfo di in dis) {size = DIRSIZE (DI);} return (size);

转载请注明原文地址:https://www.9cbs.com/read-100689.html

New Post(0)