Back: DirectedMessage-saving and loading Up: Base classes Forward: Directory class-file name management   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.65 Directory

Defined in namespace Smalltalk
Superclass: Object
Category: Streams-Files
I am the counterpart of File in a tree-structured file system. I provide the notion of a current working directory and know several well-known places in the file system.

However, all navigation methods for directories are under FilePath or File for efficiency reasons. Refer to the manual of FilePath for information on how to use the instances returned by my class methods.

1.65.1 Directory class: file name management  (class)
1.65.2 Directory class: file operations  (class)
1.65.3 Directory class: reading system defaults  (class)


1.65.1 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


1.65.2 Directory class: file operations

allFilesMatching: aPattern do: aBlock
Invoke #allFilesMatching:do: on the current working directory.

create: dirName
Create a directory named dirName and answer it.

createTemporary: prefix
Create an empty directory whose name starts with prefix and answer it.

working
Answer the current working directory, not following symlinks.

working: dirName
Change the current working directory to dirName.


1.65.3 Directory class: reading system defaults

execPrefix
Answer the path to GNU Smalltalk's executable installation prefix

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.

libexec
Answer the path to GNU Smalltalk's auxiliary executables

localKernel
Answer the path to the GNU Smalltalk kernel's Smalltalk source files. Same as `Directory kernel' since GNU Smalltalk 3.0.

module
Answer the path to GNU Smalltalk's dynamically loaded modules

prefix
Answer the path to GNU Smalltalk's installation prefix

systemKernel
Answer the path to the installed Smalltalk kernel source files.

temporary
Answer the path in which temporary files can be created. This is read from the environment, and guessed if that fails.

userBase
Answer the base path under which file for user customization of GNU Smalltalk are stored.



Back: Directory class-file operations Up: Directory Forward: DLD   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on April, 16 2013 using texi2html