Lines Matching refs:zFile
2225 const char *zFile, in makeDirectory() argument
2228 char *zCopy = sqlite3_mprintf("%s", zFile); in makeDirectory()
2267 const char *zFile, /* File to write */ in writeFile() argument
2275 if( symlink(zTo, zFile)<0 ) return 1; in writeFile()
2280 if( mkdir(zFile, mode) ){ in writeFile()
2287 || 0!=stat(zFile, &sStat) in writeFile()
2289 || ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777)) in writeFile()
2298 FILE *out = fopen(zFile, "wb"); in writeFile()
2309 if( rc==0 && mode && chmod(zFile, mode & 0777) ){ in writeFile()
2331 zFile, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, in writeFile()
2347 if( utimensat(AT_FDCWD, zFile, times, AT_SYMLINK_NOFOLLOW) ){ in writeFile()
2356 if( utimes(zFile, times) ){ in writeFile()
2374 const char *zFile; in writefileFunc() local
2386 zFile = (const char*)sqlite3_value_text(argv[0]); in writefileFunc()
2387 if( zFile==0 ) return; in writefileFunc()
2395 res = writeFile(context, zFile, argv[1], mode, mtime); in writefileFunc()
2397 if( makeDirectory(zFile, mode)==SQLITE_OK ){ in writefileFunc()
2398 res = writeFile(context, zFile, argv[1], mode, mtime); in writefileFunc()
2404 ctxErrorMsg(context, "failed to create symlink: %s", zFile); in writefileFunc()
2406 ctxErrorMsg(context, "failed to create directory: %s", zFile); in writefileFunc()
2408 ctxErrorMsg(context, "failed to write file: %s", zFile); in writefileFunc()
4160 char *zFile; /* Filename (sqlite3_malloc()) */ member
4235 char *zFile; /* Zip file this table accesses (may be NULL) */ member
4283 const char *zFile = 0; in zipfileConnect() local
4288 zFile = argv[3]; in zipfileConnect()
4289 nFile = (int)strlen(zFile)+1; in zipfileConnect()
4298 if( zFile ){ in zipfileConnect()
4299 pNew->zFile = (char*)&pNew->aBuffer[ZIPFILE_BUFFER_SIZE]; in zipfileConnect()
4300 memcpy(pNew->zFile, zFile, nFile); in zipfileConnect()
4301 zipfileDequote(pNew->zFile); in zipfileConnect()
4339 sqlite3_free(pCsr->cds.zFile); in zipfileResetCursor()
4340 pCsr->cds.zFile = 0; in zipfileResetCursor()
4492 sqlite3_free(pCsr->cds.zFile); in zipfileCsrReadCDS()
4493 pCsr->cds.zFile = 0; in zipfileCsrReadCDS()
4521 pCsr->cds.zFile = sqlite3_mprintf("%.*s", (int)pCsr->cds.nFile, aRead); in zipfileCsrReadCDS()
4780 sqlite3_result_text(ctx, pCsr->cds.zFile, -1, SQLITE_TRANSIENT); in zipfileColumn()
4830 if( !(mode & S_IFDIR) && pCsr->cds.zFile[pCsr->cds.nFile-1]!='/' ){ in zipfileColumn()
4936 const char *zFile; /* Zip file to scan */ in zipfileFilter() local
4941 if( pTab->zFile ){ in zipfileFilter()
4942 zFile = pTab->zFile; in zipfileFilter()
4949 zFile = (const char*)sqlite3_value_text(argv[0]); in zipfileFilter()
4953 pCsr->pFile = fopen(zFile, "rb"); in zipfileFilter()
4955 zipfileSetErrmsg(pCsr, "cannot open file: %s", zFile); in zipfileFilter()
5269 assert( pTab->zFile ); in zipfileUpdate()
5447 if( pTab->zFile==0 ){ in zipfileBegin()
5458 pTab->pWriteFd = fopen(pTab->zFile, "ab+"); in zipfileBegin()
5461 "zipfile: failed to open file %s for writing", pTab->zFile in zipfileBegin()
10594 static FILE *output_file_open(const char *zFile, int bTextMode){ in output_file_open() argument
10596 if( strcmp(zFile,"stdout")==0 ){ in output_file_open()
10598 }else if( strcmp(zFile, "stderr")==0 ){ in output_file_open()
10600 }else if( strcmp(zFile, "off")==0 ){ in output_file_open()
10603 f = fopen(zFile, bTextMode ? "w" : "wb"); in output_file_open()
10605 utf8_printf(stderr, "Error: cannot open \"%s\"\n", zFile); in output_file_open()
10650 const char *zFile; /* Name of the input file */ member
10723 p->zFile, p->nLine, cQuote); in csv_read_one_field()
10727 p->zFile, startLine, cQuote); in csv_read_one_field()
11675 const char *zFile; /* --file argument, or NULL */ member
11771 pAr->zFile = zArg; in arProcessSwitch()
12211 if( cmd.zFile ){ in arDotCommand()
12212 eDbType = deduceDatabaseType(cmd.zFile); in arDotCommand()
12217 if( cmd.zFile==0 ){ in arDotCommand()
12220 cmd.zSrcTable = sqlite3_mprintf("zipfile(%Q)", cmd.zFile); in arDotCommand()
12228 }else if( cmd.zFile ){ in arDotCommand()
12238 utf8_printf(pState->out, "-- open database '%s'%s\n", cmd.zFile, in arDotCommand()
12241 rc = sqlite3_open_v2(cmd.zFile, &cmd.db, flags, in arDotCommand()
12245 cmd.zFile, sqlite3_errmsg(cmd.db) in arDotCommand()
12764 char *zFile; /* Name of file to extra content from */ in do_meta_command() local
12780 zFile = azArg[1]; in do_meta_command()
12814 sCtx.zFile = zFile; in do_meta_command()
12816 if( sCtx.zFile[0]=='|' ){ in do_meta_command()
12821 sCtx.in = popen(sCtx.zFile+1, "r"); in do_meta_command()
12822 sCtx.zFile = "<pipe>"; in do_meta_command()
12826 sCtx.in = fopen(sCtx.zFile, "rb"); in do_meta_command()
12835 utf8_printf(stderr, "Error: cannot open \"%s\"\n", zFile); in do_meta_command()
12861 utf8_printf(stderr,"%s: empty file\n", sCtx.zFile); in do_meta_command()
12930 sCtx.zFile, startLine, nCol, i+1); in do_meta_command()
12942 sCtx.zFile, startLine, nCol, i); in do_meta_command()
12948 utf8_printf(stderr, "%s:%d: INSERT failed: %s\n", sCtx.zFile, in do_meta_command()
13122 const char *zFile, *zProc; in do_meta_command() local
13129 zFile = azArg[1]; in do_meta_command()
13132 rc = sqlite3_load_extension(p->db, zFile, zProc, &zErrMsg); in do_meta_command()
13146 const char *zFile = azArg[1]; in do_meta_command() local
13148 p->pLog = output_file_open(zFile, 0); in do_meta_command()
13261 const char *zFile = nArg>=2 ? azArg[1] : "stdout"; in do_meta_command() local
13267 zFile = azArg[1] = "-x"; in do_meta_command()
13286 if( zFile[0]=='-' && zFile[1]=='-' ) zFile++; in do_meta_command()
13287 if( strcmp(zFile, "-e")==0 || strcmp(zFile, "-x")==0 ){ in do_meta_command()
13290 if( zFile[1]=='x' ){ in do_meta_command()
13299 zFile = p->zTempFile; in do_meta_command()
13301 if( zFile[0]=='|' ){ in do_meta_command()
13307 p->out = popen(zFile + 1, "w"); in do_meta_command()
13309 utf8_printf(stderr,"Error: cannot open pipe \"%s\"\n", zFile + 1); in do_meta_command()
13313 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile); in do_meta_command()
13317 p->out = output_file_open(zFile, bTxtMode); in do_meta_command()
13319 if( strcmp(zFile,"off")!=0 ){ in do_meta_command()
13320 utf8_printf(stderr,"Error: cannot write to \"%s\"\n", zFile); in do_meta_command()
13325 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile); in do_meta_command()