Lugaru's Epsilon
Editor 14.04

Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      . . .
      Display Primitives
         Creating & Destroying Windows
         Window Resizing Primitives
         Preserving Window Arrangements
         . . .
      File Primitives
         . . .
         File Properties
         Low-level File Primitives
            Dired Subroutines
         Manipulating File Names
         Internet Primitives
         . . .
      Operating System Primitives
         System Primitives
         Window System Primitives
         Calling Windows DLLs
         Running a Process
      . . .

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 >


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 has no effect. Under 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. On other platforms, Epsilon sets up a modified shell prompt which sends a hidden current directory message, received internally.

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

Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.