|(require htdp/dir)||package: htdp-lib|
The teachpack provides structures and functions for working with files and directories:
(struct dir (name dirs files) #:extra-constructor-name make-dir) name : symbol? dirs : (listof dir?) files : (listof file?)
#:extra-constructor-name make-file) name : symbol? size : integer? content : (listof char?)
Turns the directory found at path on your computer into an instance of dir?.
Sample: Set teachpack to "dir.rkt" and click Run:
Using “.” usually means the directory in which your program is located. In this case, the directory contains no sub-directories and six files.
Note: Soft links are always treated as if they were empty files.