|
|
6.58 Directory
- Defined in namespace Smalltalk
- Category: Streams-Files
6.58.1 Directory class: C functions
- primCreate: dirName mode: mode
- C call-out to mkdir. Do not modify!
- primRemove: fileName
- C call-out to rmdir. Do not modify!
- primWorking: dirName
- C call-out to chdir. Do not modify!
- working
- C call-out to getCurDirName. Do not modify!
6.58.2 Directory class: file name management
- append: fileName to: directory
- Answer the name of a file named `fileName' which resides in a directory named `directory'.
- pathSeparator
- Answer (as a Character) the character used to separate directory names
- pathSeparatorString
- Answer (in a String) the character used to separate directory names
6.58.3 Directory class: file operations
- create: dirName
- Change the current working directory to dirName.
- working: dirName
- Change the current working directory to dirName.
6.58.4 Directory class: reading system defaults
- home
- Answer the path to the user's home directory
- image
- Answer the path to GNU Smalltalk's image file
- kernel
- Answer the path in which a local version of the GNU Smalltalk kernel's Smalltalk source files were searched when the image was created
- localKernel
- Answer the path in which a local version of the GNU Smalltalk kernel's Smalltalk source files were found
- module
- Answer the path to GNU Smalltalk's dynamically loaded modules
- systemKernel
- Answer the path to the GNU Smalltalk kernel's Smalltalk source files
6.58.5 Directory: accessing
- at: aName
- Answer a File object for a file named `aName' residing in the directory represented by the receiver.
- directoryAt: aName
- Answer a Directory object for a file named `aName' residing in the directory represented by the receiver.
- fullNameAt: aName
- Answer a String containing the full path to a file named `aName' which resides in the directory represented by the receiver.
- includes: aName
- Answer whether a file named `aName' exists in the directory represented by the receiver.
- nameAt: aName
- Answer a String containing the path to a file named `aName' which resides in the directory represented by the receiver.
6.58.6 Directory: C functions
- extractDirentName: dirent
- C call-out to extractDirentName. Do not modify!
- readDir: dirObject
- C call-out to readdir. Do not modify!
- rewindDir: dirObject
- C call-out to rewinddir. Do not modify!
6.58.7 Directory: enumerating
- contents
- Answer an Array with the names of the files in the directory represented by the receiver.
- do: aBlock
- Evaluate aBlock once for each file in the directory represented by the receiver, passing its name. aBlock should not return.
- filesMatching: aPattern do: block
- Evaluate block on the File objects that match aPattern (according to String>>#match:) in the directory named by the receiver.
- namesMatching: aPattern do: block
- Evaluate block on the file names that match aPattern (according to String>>#match:) in the directory named by the receiver.
|