Query: fopen
OS: v7
Section: 3s
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
FOPEN(3S) FOPEN(3S)NAMEfopen, freopen, fdopen - open a streamSYNOPSIS#include <stdio.h> FILE *fopen(filename, type) char *filename, *type; FILE *freopen(filename, type, stream) char *filename, *type; FILE *stream; FILE *fdopen(fildes, type) char *type;DESCRIPTIONFopen opens the file named by filename and associates a stream with it. Fopen returns a pointer to be used to identify the stream in sub- sequent operations. Type is a character string having one of the following values: "r" open for reading "w" create for writing "a" append: open for writing at end of file, or create for writing Freopen substitutes the named file in place of the open stream. It returns the original value of stream. The original stream is closed. Freopen is typically used to attach the preopened constant names, stdin, stdout, stderr, to specified files. Fdopen associates a stream with a file descriptor obtained from open, dup, creat, or pipe(2). The type of the stream must agree with the mode of the open file.SEE ALSOopen(2), fclose(3)DIAGNOSTICSFopen and freopen return the pointer NULL if filename cannot be accessed.BUGSFdopen is not portable to systems other than UNIX. FOPEN(3S)
Related Man Pages |
---|
freopen(3s) - bsd |
fdopen(3) - redhat |
freopen(3) - redhat |
fdopen(3s) - ultrix |
freopen(3) - osx |
Similar Topics in the Unix Linux Community |
---|
open file stream problem |
are Associative Arrays possible in UNIX? |
What does open() do anyways? |
ways to open a file |
How to remove just LF from file? |