|  |  |  | Camel Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
struct CamelStreamFs; CamelStream * camel_stream_fs_new_with_name (const gchar *name, gint flags, mode_t mode); CamelStream * camel_stream_fs_new_with_name_and_bounds (const gchar *name, gint flags, mode_t mode, off_t start, off_t end); CamelStream * camel_stream_fs_new_with_fd (gint fd); CamelStream * camel_stream_fs_new_with_fd_and_bounds (gint fd, off_t start, off_t end);
struct CamelStreamFs {
	CamelSeekableStream parent_object;
	gint fd;             /* file descriptor on the underlying file */
};
CamelStream * camel_stream_fs_new_with_name (const gchar *name, gint flags, mode_t mode);
Creates a new CamelStreamFs corresponding to the named file, flags, and mode.
| 
 | a local filename | 
| 
 | flags as in open(2) | 
| 
 | a file mode | 
| Returns : | the new stream, or NULLon error. | 
CamelStream * camel_stream_fs_new_with_name_and_bounds (const gchar *name, gint flags, mode_t mode, off_t start, off_t end);
Creates a new CamelStream corresponding to the given arguments.
| 
 | a local filename | 
| 
 | flags as in open(2) | 
| 
 | a file mode | 
| 
 | the first valid position in the file | 
| 
 | the first invalid position in the file, or CAMEL_STREAM_UNBOUND | 
| Returns : | the stream, or NULLon error. | 
CamelStream * camel_stream_fs_new_with_fd (gint fd);
Creates a new fs stream using the given file descriptor fd as the
backing store. When the stream is destroyed, the file descriptor
will be closed.
| 
 | a file descriptor | 
| Returns : | a new CamelStreamFs | 
CamelStream * camel_stream_fs_new_with_fd_and_bounds (gint fd, off_t start, off_t end);
Gets a stream associated with the given file descriptor and bounds. When the stream is destroyed, the file descriptor will be closed.
| 
 | a file descriptor | 
| 
 | the first valid position in the file | 
| 
 | the first invalid position in the file, or CAMEL_STREAM_UNBOUND | 
| Returns : | the bound stream |