Filename: sflfile.h
Package: Standard Function Library (SFL)
Written: 1992/10/25 iMatix SFL project team sfl@imatix.com
Revised: 1999/11/08
Copyright: Copyright (c) 1996-2000 iMatix Corporation
Synopsis
Provides functions to read and write files with explicit new-
line/carriage-return control; to find files on a path; to copy
files, check files' protection, etc.
List of Functions
- FILE * file open
(const char *filename, char mode);
- FILE * file locate
(const char *path, const char *name, const char *ext);
- int file close
(FILE *stream);
- Bool file read
(FILE *stream, char *string);
- Bool file readn
(FILE *stream, char *string, int line_max);
- char * file write
(FILE *stream, const char *string);
- int file copy
(const char *dest, const char *src, char mode);
- int file concat
(const char *dest, const char *src);
- int file rename
(const char *oldname, const char *newname);
- int file delete
(const char *filename);
- char * file where
(char mode, const char *path, const char *name, const char
*ext);
- char * file where ext
(char mode, const char *path, const char *name, const char
**ext);
- Bool file exists
(const char *filename);
- Bool file cycle
(const char *filename, int how);
- Bool file cycle needed
(const char *filename, int how);
- Bool file has changed
(const char *filename, long old_date, long old_time);
- Bool safe to extend
(const char *filename);
- char * default extension
(char *dest, const char *src, const char *ext);
- char * fixed extension
(char *dest, const char *src, const char *ext);
- char * strip extension
(char *filename);
- char * add extension
(char *dest, const char *src, const char *ext);
- char * strip file path
(char *filename);
- char * strip file name
(char *filename);
- char * get new filename
(const char *filename);
- Bool file is readable
(const char *filename);
- Bool file is writeable
(const char *filename);
- Bool file is executable
(const char *filename);
- Bool file is directory
(const char *filename);
- Bool file is program
(const char *filename);
- Bool file is legal
(const char *filename);
- char * file exec name
(const char *filename);
- long get file size
(const char *filename);
- time_t get file time
(const char *filename);
- long get file lines
(const char *filename);
- DESCR * file slurp
(const char *filename);
- DESCR * file slurpl
(const char *filename);
- dbyte file set eoln
(char *dest, const char *src, dbyte src_size, Bool add_cr);
- char * get tmp file name
(const char *path, qbyte *index, const char *ext);
- int file fhredirect
(int source, int dest);
- void file fhrestore
(int source, int dest);
- FILE * ftmp open
(char **pathname);
- void ftmp close
(FILE *tempstream);
List of Symbol Definitions
sflfile.h defines these symbols, possibly conditionally:
Symbol: |
Defined as: |
---|
FILE_DIR_MAX
| 64 /* Max size of directory name */
|
FILE_NAME_MAX
| 160 /* Max size of filename */
|
FOPEN_APPEND_BINARY
| (various)
|
FOPEN_APPEND_TEXT
| (various)
|
FOPEN_READ_BINARY
| (various)
|
FOPEN_READ_TEXT
| (various)
|
FOPEN_WRITE_BINARY
| (various)
|
FOPEN_WRITE_TEXT
| (various)
|
SFLFILE_INCLUDED
| TRUE
|
file_lines(f)
| get_file_lines(f) /* Changed 98/07/23 */
|
| << | <
| > | >>
|
Copyright © 1996-2000 iMatix Corporation |