Home | History | Annotate | Download | only in cups

Lines Matching defs:directory

2  * Directory routines for CUPS.
4 * This set of APIs abstracts enumeration of directory entries.
36 struct _cups_dir_s /**** Directory data structure ****/
38 char directory[1024]; /* Directory filename */
39 HANDLE dir; /* Directory handle */
40 cups_dentry_t entry; /* Directory entry */
66 * 'cupsDirClose()' - Close a directory.
72 cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */
82 * Close an open directory handle...
97 * 'cupsDirOpen()' - Open a directory.
102 cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
103 cupsDirOpen(const char *directory) /* I - Directory name */
105 cups_dir_t *dp; /* Directory */
112 if (!directory)
116 * Allocate memory for the directory structure...
124 * Copy the directory name for later use...
129 strlcpy(dp->directory, directory, sizeof(dp->directory));
132 * Return the new directory structure...
140 * 'cupsDirRead()' - Read the next directory entry.
145 cups_dentry_t * /* O - Directory entry or @code NULL@ if there are no more */
146 cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */
148 WIN32_FIND_DATA entry; /* Directory entry data */
168 dp->dir = FindFirstFile(dp->directory, &entry);
200 * 'cupsDirRewind()' - Rewind to the start of the directory.
206 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */
216 * Close an open directory handle...
241 struct _cups_dir_s /**** Directory data structure ****/
243 char directory[1024]; /* Directory filename */
244 DIR *dir; /* Directory file */
245 cups_dentry_t entry; /* Directory entry */
250 * 'cupsDirClose()' - Close a directory.
256 cupsDirClose(cups_dir_t *dp) /* I - Directory pointer */
268 * Close the directory and free memory...
277 * 'cupsDirOpen()' - Open a directory.
282 cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
283 cupsDirOpen(const char *directory) /* I - Directory name */
285 cups_dir_t *dp; /* Directory */
288 DEBUG_printf(("cupsDirOpen(directory=\"%s\")", directory));
294 if (!directory)
298 * Allocate memory for the directory structure...
306 * Open the directory...
309 dp->dir = opendir(directory);
317 * Copy the directory name for later use...
320 strlcpy(dp->directory, directory, sizeof(dp->directory));
323 * Return the new directory structure...
331 * 'cupsDirRead()' - Read the next directory entry.
336 cups_dentry_t * /* O - Directory entry or @code NULL@ when there are no more */
337 cupsDirRead(cups_dir_t *dp) /* I - Directory pointer */
383 snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
402 * 'cupsDirRewind()' - Rewind to the start of the directory.
408 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */
420 * Rewind the directory...