check free space in a directory
조회 수: 18 (최근 30일)
이전 댓글 표시
채택된 답변
Jan
2016년 11월 14일
There is not "free space inside a folder". Folders can be filled with data until the disk is full or if a disk quota for a specific user is reached. You can check the available disk size by:
FileObj = java.io.File(Folder);
free_bytes = FileObj.getFreeSpace;
total_bytes = FileObj.getTotalSpace;
usable_bytes = FileObj.getUsableSpace;
Note that filling a disk to more than 99% (95% is better) might cause a loss of data. If the disk is exhausted, the behaviour is not well defined.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 File Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!