MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cupsDirOpen

Function cupsDirOpen

cups/dir.c:100–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 */
99
100cups_dir_t * /* O - Directory pointer or @code NULL@ if the directory could not be opened. */
101cupsDirOpen(const char *directory) /* I - Directory name */
102{
103 cups_dir_t *dp; /* Directory */
104
105
106 /*
107 * Range check input...
108 */
109
110 if (!directory)
111 return (NULL);
112
113 /*
114 * Allocate memory for the directory structure...
115 */
116
117 dp = (cups_dir_t *)calloc(1, sizeof(cups_dir_t));
118 if (!dp)
119 return (NULL);
120
121 /*
122 * Copy the directory name for later use...
123 */
124
125 dp->dir = INVALID_HANDLE_VALUE;
126
127 snprintf(dp->directory, sizeof(dp->directory), "%s\\*", directory);
128
129 /*
130 * Return the new directory structure...
131 */
132
133 return (dp);
134}
135
136
137/*

Callers 15

mimeLoadFiltersFunction · 0.85
mimeLoadTypesFunction · 0.85
load_driversFunction · 0.85
load_ppdsFunction · 0.85
cupsdCleanFilesFunction · 0.85
cupsdLoadBannersFunction · 0.85
cupsdLoadAllJobsFunction · 0.85
load_request_rootFunction · 0.85
type_dirFunction · 0.85
mainFunction · 0.85
cupsdCreateCommonDataFunction · 0.85
load_quirksFunction · 0.85

Calls

no outgoing calls

Tested by 5

type_dirFunction · 0.68
valid_pathFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68