WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

FileSystemTree [root]

gives a tree whose keys are the names of files in root, and whose data is the full names of these files.

FileSystemTree [root,levelspec]

gives a tree in which files on levels specified by levelspec are represented by a subtree.

FileSystemTree [root,levelspec,r]

combines levels to give a tree with maximum level r.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Options  
Elision  
FileNameForms  
IncludeDirectories  
Show More Show More
MaxItems  
Styling Entire Tree  
Styling Individual Tree Elements  
Tree Layout and Graphics Options  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page

FileSystemTree [root]

gives a tree whose keys are the names of files in root, and whose data is the full names of these files.

FileSystemTree [root,levelspec]

gives a tree in which files on levels specified by levelspec are represented by a subtree.

FileSystemTree [root,levelspec,r]

combines levels to give a tree with maximum level r.

Details and Options

Examples

open all close all

Basic Examples  (3)

Create a tree of all files contained in a directory:

Create a tree of all files through level 2 of the specified directory:

Create a tree containing only those files at level 2 of the specified directory:

Create a flat tree for the same directory:

Options  (12)

Elision  (1)

Display two children of all nodes:

FileNameForms  (1)

By default, all files are included:

By specifying FileNameForms->patt, the tree will be restricted to only those files that match the specified pattern:

IncludeDirectories  (1)

Empty directories have no children by default:

Include All as a child of every directory:

MaxItems  (1)

By default, the tree will contain all files in the specified directory and subdirectories:

By specifying MaxItems n, the tree will contain at most n items within each directory:

Styling Entire Tree  (4)

Specify labels and styles for all subtrees:

Specify the base style:

Specify the style for the edges and the edges of the tree elements:

Specify the base style and styles for individual tree elements:

Styling Individual Tree Elements  (1)

Specify the style for the generated tree element:

Tree Layout and Graphics Options  (3)

Specify the orientation for the root:

Specify a named embedding:

Specify Graphics options:

Properties & Relations  (1)

TreeExpression [FileSystemTree[root,],"FileSystem"] is equivalent to FileSystemMap [Identity ,root,]:

Possible Issues  (1)

When specifying a fixed number of levels, empty directories will be omitted from the resulting tree:

Wolfram Research (2022), FileSystemTree, Wolfram Language function, https://reference.wolfram.com/language/ref/FileSystemTree.html.

Text

Wolfram Research (2022), FileSystemTree, Wolfram Language function, https://reference.wolfram.com/language/ref/FileSystemTree.html.

CMS

Wolfram Language. 2022. "FileSystemTree." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FileSystemTree.html.

APA

Wolfram Language. (2022). FileSystemTree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileSystemTree.html

BibTeX

@misc{reference.wolfram_2025_filesystemtree, author="Wolfram Research", title="{FileSystemTree}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/FileSystemTree.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_filesystemtree, organization={Wolfram Research}, title={FileSystemTree}, year={2022}, url={https://reference.wolfram.com/language/ref/FileSystemTree.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /