Lines Matching full: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 */ member
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 */ in cupsDirClose()
82 * Close an open directory handle... in cupsDirClose()
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 */ in cupsDirOpen() argument
105 cups_dir_t *dp; /* Directory */ in cupsDirOpen()
112 if (!directory) in cupsDirOpen()
116 * Allocate memory for the directory structure... in cupsDirOpen()
124 * Copy the directory name for later use... in cupsDirOpen()
129 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen()
132 * Return the new directory structure... in cupsDirOpen()
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 */ in cupsDirRead()
148 WIN32_FIND_DATA entry; /* Directory entry data */ in cupsDirRead()
168 dp->dir = FindFirstFile(dp->directory, &entry); in cupsDirRead()
200 * 'cupsDirRewind()' - Rewind to the start of the directory.
206 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRewind()
216 * Close an open directory handle... in cupsDirRewind()
241 struct _cups_dir_s /**** Directory data structure ****/
243 char directory[1024]; /* Directory filename */ member
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 */ in cupsDirClose()
268 * Close the directory and free memory... in cupsDirClose()
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 */ in cupsDirOpen() argument
285 cups_dir_t *dp; /* Directory */ in cupsDirOpen()
288 DEBUG_printf(("cupsDirOpen(directory=\"%s\")", directory)); in cupsDirOpen()
294 if (!directory) in cupsDirOpen()
298 * Allocate memory for the directory structure... in cupsDirOpen()
306 * Open the directory... in cupsDirOpen()
309 dp->dir = opendir(directory); in cupsDirOpen()
317 * Copy the directory name for later use... in cupsDirOpen()
320 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen()
323 * Return the new directory structure... in cupsDirOpen()
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 */ in cupsDirRead()
383 snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name); in cupsDirRead()
402 * 'cupsDirRewind()' - Rewind to the start of the directory.
408 cupsDirRewind(cups_dir_t *dp) /* I - Directory pointer */ in cupsDirRewind()
420 * Rewind the directory... in cupsDirRewind()