Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Dir Source Code
 previous   up   next 

Types
dir_file
File to read the contents of a directory.

dir_file

const type: dir_file

File to read the contents of a directory.


Function Summary
file
openDir (in string: dir_name)
Open a dir_file.
string
getln (inout dir_file: aFile)
Read a file name from a dir_file.
string
getwd (inout dir_file: aFile)
Read a file name from a dir_file.
boolean
eof (in dir_file: aFile)
Determine the end-of-file indicator.
boolean
hasNext (in dir_file: aFile)
Determine if another filename can be read successfully.

Function Detail

openDir

const func file: openDir (in string: dir_name)

Open a dir_file.

Returns:
the dir_file opened, or STD_NULL if it could not be opened.
Raises:
MEMORY_ERROR - Not enough memory to convert the path to the system path type.
RANGE_ERROR - 'path' does not use the standard path representation or it cannot be converted to the system path type.

getln

const func string: getln (inout dir_file: aFile)

Read a file name from a dir_file. When the function is left dir_file.bufferChar contains '\n' or EOF.

Returns:
the file name.

getwd

const func string: getwd (inout dir_file: aFile)

Read a file name from a dir_file. When the function is left dir_file.bufferChar contains '\n' or EOF.

Returns:
the file name.

eof

const func boolean: eof (in dir_file: aFile)

Determine the end-of-file indicator.

Returns:
TRUE if the end-of-file indicator is set, FALSE otherwise.

hasNext

const func boolean: hasNext (in dir_file: aFile)

Determine if another filename can be read successfully. This function allows a file to be handled like an iterator.

Returns:
FALSE if 'getln' would return "", TRUE otherwise.


 previous   up   next