Back to index

tetex-bin  3.0
Public Member Functions | Private Attributes
GDirEntry Class Reference

#include <gfile.h>

Collaboration diagram for GDirEntry:
Collaboration graph

List of all members.

Public Member Functions

 GDirEntry (char *dirPath, char *nameA, GBool doStat)
 ~GDirEntry ()
GStringgetName ()
GBool isDir ()

Private Attributes

GBool dir

Detailed Description

Definition at line 99 of file gfile.h.

Constructor & Destructor Documentation

GDirEntry::GDirEntry ( char *  dirPath,
char *  nameA,
GBool  doStat 

Definition at line 566 of file

#ifdef VMS
  char *p;
#elif defined(WIN32)
  int fa;
  GString *s;
#elif defined(ACORN)
  struct stat st;
  GString *s;

  name = new GString(nameA);
  dir = gFalse;
  if (doStat) {
#ifdef VMS
    if (!strcmp(nameA, "-") ||
       ((p = strrchr(nameA, '.')) && !strncmp(p, ".DIR;", 5)))
      dir = gTrue;
#elif defined(ACORN)
    s = new GString(dirPath);
    appendToPath(s, nameA);
#ifdef WIN32
    fa = GetFileAttributes(s->getCString());
    dir = (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY));
    if (stat(s->getCString(), &st) == 0)
      dir = S_ISDIR(st.st_mode);
    delete s;

Here is the call graph for this function:

Definition at line 601 of file

  delete name;

Member Function Documentation

GString* GDirEntry::getName ( ) [inline]

Definition at line 104 of file gfile.h.

{ return name; }
GBool GDirEntry::isDir ( ) [inline]

Definition at line 105 of file gfile.h.

{ return dir; }

Member Data Documentation

GBool GDirEntry::dir [private]

Definition at line 110 of file gfile.h.

Definition at line 109 of file gfile.h.

The documentation for this class was generated from the following files: