Previous
|
Up
|
Next
|
Low-level File Primitives |
Primitives and EEL Subroutines |
Dired Subroutines |
Epsilon User's Manual and Reference >
Primitives and EEL Subroutines >
File Primitives >
Directories
getcd(char *dir)
int chdir(char *dir)
The getcd( ) primitive returns the current directory,
placing it in the provided string. For Windows, the format is
C:\harold\work.
The chdir( ) primitive sets the current directory. (Under
Windows, it sets the current drive as well if its argument refers to a
drive. For example, invoking chdir("A:\letters"); sets the
current drive to A, then sets the current directory for drive A to
\letters. chdir("A:"); sets only the current drive.)
The result for this primitive is 0 if the attempt succeeded, and
-1 if it failed. The errno variable is set with a code
showing the type of error in the latter case.
put_directory(char *dir) /* files.e subr. */
int get_buffer_directory(char *dir)
The put_directory( ) subroutine copies the directory part of
the file name associated with the current buffer into dir .
Normally the directory name will end with a path separator character
like "/" or "\". If the current buffer has no associated file
name, dir will be set to the empty string.
The get_buffer_directory( ) subroutine gets the default
directory for the current buffer in dir . In most cases this is
the directory part of the buffer's filename variable, but
special buffers like dired buffers have their own rules. The
subroutine returns nonzero if the buffer had an associated directory.
If the buffer has no associated directory, the subroutine puts
Epsilon's current directory in dir and returns 0 .
user char *process_current_directory;
Epsilon stores the concurrent process's current directory in the
process_current_directory variable. Setting this variable
switches the concurrent process to a different current directory. To
set this variable, use the syntax process_current_directory = new
value; . Don't use strcpy() , for example, to modify it.
Under Windows 95/98/ME, Epsilon only transmits current directory
information to or from the process when the process stops for console
input. Under later versions of Windows, Epsilon tries to detect the
process's current directory from EEL code and set this variable. See
the variable use-process-current-directory for more details.
Under Unix, Epsilon tries to retrieve the process's current directory
whenever you access this variable, but setting it has no effect.
int mkdir(char *dir)
int rmdir(char *dir)
The mkdir( ) subroutine makes a new directory with the given
name, and the rmdir( ) subroutine removes an empty directory
with the given name. Each primitive returns 0 on success and
-1 on failure, and sets errno in the latter case, as with
chdir( ).
get_customization_directory(char *dir)
When Epsilon starts, it locates its customization directory, as
described in The Customization Directory. The
get_customization_directory( ) primitive copies the name of
this directory to dir . The directory name always ends with a path
separator character, either "\" or "/".
Previous
|
Up
|
Next
|
Low-level File Primitives |
Primitives and EEL Subroutines |
Dired Subroutines |
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|