| Lesson
8:
File
System
Increment
1:
File Names and Directories.
A "file name" is
a String.
Example: "C:\\MyDir\\MyFile.q".
A "full file name" is a String that
begins with a device letter and colon, e.g. C:.
A "relative file name" is a String that
does not begin with a device letter and colon. Relative file names
that begin with ~ are
completed to full file names by erasing ~
and prefixing the "Quantum
directory". Relative file names that do not begin with ~
are completed to full file
names by prefixing the "current directory".
GetCurrentDirectory The
"current directory".
GetQuantumDirectory The
"Quantum directory".
Usually "C:\\Program Files\\Planet
Quantum\\Quantum 2006"
GetWindowsDirectory Usually
"C:\\Windows"
GetSystemDirectory Usually
"C:\\Windows\\System"
The "current directory"
is whatever you like. You will find that if you right click your
mouse on the "Quantum.exe" icon on your desktop and select "Properties"
from the pop up context menu, that there is a "Start in:" edit field on
the "Shortcut" property sheet. You can reset the current directory
of a running session of Quantum by using either Cd
or SetCurrentDirectory.
Escape sequence \\ produces
a single \ character in
the memory representation of a String.
This is why you need \\
in the Read representation
of Quantum file names.
|