•  Back 
  •  Directory functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File5.16.11  Dopendir                                                  TOS

 Name:         »Dopendir« - Open a specified directory for reading.

 Opcode:       296

 Syntax:       int32_t Dopendir ( int8_t *name, int16_t flag );

 Description:  The function Dopendir opens the directory name for 
               reading. name should be NULL-terminated and should not 
               contain a trailing backslash. The parameter flag 
               describes the manner in which the directory is to be 
               opened:

                flag  Meaning

                0     Normal mode
                      In this mode an attempt is made not to restrict 
                      the length of the filename. Also, Dreaddir in 
                      this mode return an index number (similar to the 
                      UNIX inode's) in the first 4 bytes of the 
                      filename.
                1     Compatibility mode
                      In this mode file-systems behave as if Fsfirst 
                      or Fsnext calls were being used. In particular, 
                      filenames will be truncated according to the 
                      DOS-convention to 8+3 characters, if that is 
                      possible.

               Newer programs should always use the normal mode if 
               possible, in order to exploit the full functionaity.

 Return value: The function returns a 32-bit directory handle if 
               successful; this may also be negative, but in no case 
               may contain the value 0xff in the higher byte, through 
               which it can be differentiated from errors.

               In case of error, the following returns are possible:

                EPTHNF :  name is not a valid directory
                EACCDN :  The directory is not addressable by this 
                          program
                ENSMEM :  The kernel cannot allocate memory for this 
                          operation

 Availability: Available when a 'MiNT' cookie with a version of at 
               least 0.90 exists, and in MagiC as of Version 3.0.

 Group:        Directory functions

 See Also:     Binding   Dclosedir   Dreaddir   Drewinddir   Pdomain