Lines Matching refs:zFile
2219 const char *zFile, in makeDirectory() argument
2222 char *zCopy = sqlite3_mprintf("%s", zFile); in makeDirectory()
2261 const char *zFile, /* File to write */ in writeFile() argument
2269 if( symlink(zTo, zFile)<0 ) return 1; in writeFile()
2274 if( mkdir(zFile, mode) ){ in writeFile()
2281 || 0!=stat(zFile, &sStat) in writeFile()
2283 || ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777)) in writeFile()
2292 FILE *out = fopen(zFile, "wb"); in writeFile()
2303 if( rc==0 && mode && chmod(zFile, mode & 0777) ){ in writeFile()
2325 zFile, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, in writeFile()
2341 if( utimensat(AT_FDCWD, zFile, times, AT_SYMLINK_NOFOLLOW) ){ in writeFile()
2350 if( utimes(zFile, times) ){ in writeFile()
2368 const char *zFile; in writefileFunc() local
2380 zFile = (const char*)sqlite3_value_text(argv[0]); in writefileFunc()
2381 if( zFile==0 ) return; in writefileFunc()
2389 res = writeFile(context, zFile, argv[1], mode, mtime); in writefileFunc()
2391 if( makeDirectory(zFile, mode)==SQLITE_OK ){ in writefileFunc()
2392 res = writeFile(context, zFile, argv[1], mode, mtime); in writefileFunc()
2398 ctxErrorMsg(context, "failed to create symlink: %s", zFile); in writefileFunc()
2400 ctxErrorMsg(context, "failed to create directory: %s", zFile); in writefileFunc()
2402 ctxErrorMsg(context, "failed to write file: %s", zFile); in writefileFunc()
4154 char *zFile; /* Filename (sqlite3_malloc()) */ member
4229 char *zFile; /* Zip file this table accesses (may be NULL) */ member
4277 const char *zFile = 0; in zipfileConnect() local
4282 zFile = argv[3]; in zipfileConnect()
4283 nFile = (int)strlen(zFile)+1; in zipfileConnect()
4292 if( zFile ){ in zipfileConnect()
4293 pNew->zFile = (char*)&pNew->aBuffer[ZIPFILE_BUFFER_SIZE]; in zipfileConnect()
4294 memcpy(pNew->zFile, zFile, nFile); in zipfileConnect()
4295 zipfileDequote(pNew->zFile); in zipfileConnect()
4333 sqlite3_free(pCsr->cds.zFile); in zipfileResetCursor()
4334 pCsr->cds.zFile = 0; in zipfileResetCursor()
4486 sqlite3_free(pCsr->cds.zFile); in zipfileCsrReadCDS()
4487 pCsr->cds.zFile = 0; in zipfileCsrReadCDS()
4515 pCsr->cds.zFile = sqlite3_mprintf("%.*s", (int)pCsr->cds.nFile, aRead); in zipfileCsrReadCDS()
4774 sqlite3_result_text(ctx, pCsr->cds.zFile, -1, SQLITE_TRANSIENT); in zipfileColumn()
4824 if( !(mode & S_IFDIR) && pCsr->cds.zFile[pCsr->cds.nFile-1]!='/' ){ in zipfileColumn()
4930 const char *zFile; /* Zip file to scan */ in zipfileFilter() local
4935 if( pTab->zFile ){ in zipfileFilter()
4936 zFile = pTab->zFile; in zipfileFilter()
4943 zFile = (const char*)sqlite3_value_text(argv[0]); in zipfileFilter()
4947 pCsr->pFile = fopen(zFile, "rb"); in zipfileFilter()
4949 zipfileSetErrmsg(pCsr, "cannot open file: %s", zFile); in zipfileFilter()
5263 assert( pTab->zFile ); in zipfileUpdate()
5441 if( pTab->zFile==0 ){ in zipfileBegin()
5452 pTab->pWriteFd = fopen(pTab->zFile, "ab+"); in zipfileBegin()
5455 "zipfile: failed to open file %s for writing", pTab->zFile in zipfileBegin()
10571 static FILE *output_file_open(const char *zFile, int bTextMode){ in output_file_open() argument
10573 if( strcmp(zFile,"stdout")==0 ){ in output_file_open()
10575 }else if( strcmp(zFile, "stderr")==0 ){ in output_file_open()
10577 }else if( strcmp(zFile, "off")==0 ){ in output_file_open()
10580 f = fopen(zFile, bTextMode ? "w" : "wb"); in output_file_open()
10582 utf8_printf(stderr, "Error: cannot open \"%s\"\n", zFile); in output_file_open()
10627 const char *zFile; /* Name of the input file */ member
10700 p->zFile, p->nLine, cQuote); in csv_read_one_field()
10704 p->zFile, startLine, cQuote); in csv_read_one_field()
11652 const char *zFile; /* --file argument, or NULL */ member
11748 pAr->zFile = zArg; in arProcessSwitch()
12188 if( cmd.zFile ){ in arDotCommand()
12189 eDbType = deduceDatabaseType(cmd.zFile); in arDotCommand()
12194 if( cmd.zFile==0 ){ in arDotCommand()
12197 cmd.zSrcTable = sqlite3_mprintf("zipfile(%Q)", cmd.zFile); in arDotCommand()
12205 }else if( cmd.zFile ){ in arDotCommand()
12215 utf8_printf(pState->out, "-- open database '%s'%s\n", cmd.zFile, in arDotCommand()
12218 rc = sqlite3_open_v2(cmd.zFile, &cmd.db, flags, in arDotCommand()
12222 cmd.zFile, sqlite3_errmsg(cmd.db) in arDotCommand()
12741 char *zFile; /* Name of file to extra content from */ in do_meta_command() local
12757 zFile = azArg[1]; in do_meta_command()
12791 sCtx.zFile = zFile; in do_meta_command()
12793 if( sCtx.zFile[0]=='|' ){ in do_meta_command()
12798 sCtx.in = popen(sCtx.zFile+1, "r"); in do_meta_command()
12799 sCtx.zFile = "<pipe>"; in do_meta_command()
12803 sCtx.in = fopen(sCtx.zFile, "rb"); in do_meta_command()
12812 utf8_printf(stderr, "Error: cannot open \"%s\"\n", zFile); in do_meta_command()
12838 utf8_printf(stderr,"%s: empty file\n", sCtx.zFile); in do_meta_command()
12907 sCtx.zFile, startLine, nCol, i+1); in do_meta_command()
12919 sCtx.zFile, startLine, nCol, i); in do_meta_command()
12925 utf8_printf(stderr, "%s:%d: INSERT failed: %s\n", sCtx.zFile, in do_meta_command()
13099 const char *zFile, *zProc; in do_meta_command() local
13106 zFile = azArg[1]; in do_meta_command()
13109 rc = sqlite3_load_extension(p->db, zFile, zProc, &zErrMsg); in do_meta_command()
13123 const char *zFile = azArg[1]; in do_meta_command() local
13125 p->pLog = output_file_open(zFile, 0); in do_meta_command()
13238 const char *zFile = nArg>=2 ? azArg[1] : "stdout"; in do_meta_command() local
13244 zFile = azArg[1] = "-x"; in do_meta_command()
13263 if( zFile[0]=='-' && zFile[1]=='-' ) zFile++; in do_meta_command()
13264 if( strcmp(zFile, "-e")==0 || strcmp(zFile, "-x")==0 ){ in do_meta_command()
13267 if( zFile[1]=='x' ){ in do_meta_command()
13276 zFile = p->zTempFile; in do_meta_command()
13278 if( zFile[0]=='|' ){ in do_meta_command()
13284 p->out = popen(zFile + 1, "w"); in do_meta_command()
13286 utf8_printf(stderr,"Error: cannot open pipe \"%s\"\n", zFile + 1); in do_meta_command()
13290 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile); in do_meta_command()
13294 p->out = output_file_open(zFile, bTxtMode); in do_meta_command()
13296 if( strcmp(zFile,"off")!=0 ){ in do_meta_command()
13297 utf8_printf(stderr,"Error: cannot write to \"%s\"\n", zFile); in do_meta_command()
13302 sqlite3_snprintf(sizeof(p->outfile), p->outfile, "%s", zFile); in do_meta_command()