2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef OPENAFS_FILEUTIL_H
11 #define OPENAFS_FILEUTIL_H
13 /* File-oriented utility functions */
15 /* Path normalization routines */
16 #define FPN_FORWARD_SLASHES 1
17 #define FPN_BACK_SLASHES 2
20 FilepathNormalizeEx(char *path, int slashType);
22 /* Just a wrapper for FilepathNormalizeEx(path, FPN_FORWARD_SLASHES); */
24 FilepathNormalize(char *path);
27 * Data structure used to implement buffered I/O. We cannot
28 * use fopen in the fileserver because the file descriptor
29 * in the FILE structure only has 8 bits.
32 #define BUFIO_INVALID_FD (-1)
34 #define BUFIO_BUFSIZE 4096
41 char buf[BUFIO_BUFSIZE];
44 /* Open a file for buffered I/O */
45 extern bufio_p BufioOpen(char *path, int oflag, int mode);
47 /* Read the next line of a file */
49 BufioGets(bufio_p bp, char *buf, int len);
51 /* Close a buffered I/O handle */
53 BufioClose(bufio_p bp);
55 #endif /* OPENAFS_FILEUTIL_H */