Lines Matching full:filename
33 const char *pattern) /* I - Filename pattern or NULL */ in cupsdCleanFiles()
37 char filename[1024]; /* Filename */ in cupsdCleanFiles() local
56 if (pattern && fnmatch(pattern, dent->filename, 0)) in cupsdCleanFiles()
59 snprintf(filename, sizeof(filename), "%s/%s", path, dent->filename); in cupsdCleanFiles()
63 cupsdCleanFiles(filename, pattern); in cupsdCleanFiles()
65 status = rmdir(filename); in cupsdCleanFiles()
68 status = cupsdUnlinkOrRemoveFile(filename); in cupsdCleanFiles()
71 cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to remove \"%s\" - %s", filename, in cupsdCleanFiles()
87 const char *filename) /* I - Filename */ in cupsdCloseCreatedConfFile() argument
89 char newfile[1024], /* filename.N */ in cupsdCloseCreatedConfFile()
90 oldfile[1024]; /* filename.O */ in cupsdCloseCreatedConfFile()
102 filename, strerror(errno)); in cupsdCloseCreatedConfFile()
110 filename, strerror(errno)); in cupsdCloseCreatedConfFile()
124 * Then remove "filename.O", rename "filename" to "filename.O", and rename in cupsdCloseCreatedConfFile()
125 * "filename.N" to "filename". in cupsdCloseCreatedConfFile()
128 snprintf(newfile, sizeof(newfile), "%s.N", filename); in cupsdCloseCreatedConfFile()
129 snprintf(oldfile, sizeof(oldfile), "%s.O", filename); in cupsdCloseCreatedConfFile()
132 (rename(filename, oldfile) && errno != ENOENT) || in cupsdCloseCreatedConfFile()
133 rename(newfile, filename)) in cupsdCloseCreatedConfFile()
136 filename, strerror(errno)); in cupsdCloseCreatedConfFile()
175 const char *filename, /* I - Filename */ in cupsdCreateConfFile() argument
179 char newfile[1024]; /* filename.N */ in cupsdCreateConfFile()
182 snprintf(newfile, sizeof(newfile), "%s.N", filename); in cupsdCreateConfFile()
207 * This function looks for "filename.O" if "filename" does not exist and does
212 cupsdOpenConfFile(const char *filename) /* I - Filename */ in cupsdOpenConfFile() argument
217 if ((fp = cupsFileOpen(filename, "r")) == NULL) in cupsdOpenConfFile()
225 char oldfile[1024]; /* filename.O */ in cupsdOpenConfFile()
227 snprintf(oldfile, sizeof(oldfile), "%s.O", filename); in cupsdOpenConfFile()
231 cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open \"%s\": %s", filename, in cupsdOpenConfFile()
297 cupsdRemoveFile(const char *filename) /* I - File to remove */ in cupsdRemoveFile() argument
304 if (access(filename, 0)) in cupsdRemoveFile()
307 cupsdLogMessage(CUPSD_LOG_DEBUG, "Securely removing \"%s\".", filename); in cupsdRemoveFile()
313 return (removefile(filename, NULL, REMOVEFILE_SECURE_1_PASS)); in cupsdRemoveFile()
326 if (access(filename, 0)) in cupsdRemoveFile()
329 cupsdLogMessage(CUPSD_LOG_DEBUG, "Securely removing \"%s\".", filename); in cupsdRemoveFile()
335 if ((fd = open(filename, O_WRONLY | O_EXCL)) < 0) in cupsdRemoveFile()
343 if (unlink(filename)) in cupsdRemoveFile()
389 const char *filename) /* I - Filename */ in cupsdUnlinkOrRemoveFile() argument
392 return (cupsdRemoveFile(filename)); in cupsdUnlinkOrRemoveFile()
394 return (unlink(filename)); in cupsdUnlinkOrRemoveFile()