Generate a subdirectory listing from a path string.

버전 1.2.0.0 (1.94 KB) 작성자: DS
PATH_PARTS returns a listing of strings representing subdirectories parsed from a path string.
다운로드 수: 199
업데이트 날짜: 2012/3/29

라이선스 보기

A simple function that examines a string and returns a naive directory listing; no validity checks are made on subdirectory strings.

A = PATH_PARTS(S) returns a cell array of strings containing the sub-strings delimited by the system file separator.

[A,B] = PATH_PARTS(S) returns the directory strings parsed from the input string, S, where A is a cell array of strings, and B is a struct with a field representing each subdirectory.

[A,B,C] = PATH_PARTS(S) returns the directory strings determined from S in the cell array, A, the struct B, and as an array of strings with equal length.

-----
Please note: There are many interesting submissions on FEX which provide much more sophisticated results and options for dealing with directories (see below).

#28442 - directory to cell
#1570 - dirdir
#1492 - Subdir
#3226 - Recursive directory listing-enhanced RDIR
#12180 - FileSeries
#28249 - GetFullPath

인용 양식

DS (2024). Generate a subdirectory listing from a path string. (https://www.mathworks.com/matlabcentral/fileexchange/35881-generate-a-subdirectory-listing-from-a-path-string), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 File Name Construction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Info text edit; no code changes.

1.1.0.0

Fixed the regular expression for filename exclusion.

1.0.0.0