Fossil

Check-in [f23334cb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add comment describing file_wd_isfile() function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f23334cbda2ee24202584a973e2ca823bbafc7e5
User & Date: dmitry 2011-09-08 14:30:40
Context
2011-09-10
21:21
Add a new quote to the documentation. check-in: 136519f4 user: drh tags: trunk
2011-09-08
14:30
Add comment describing file_wd_isfile() function. check-in: f23334cb user: dmitry tags: trunk
13:07
Remove unused variable from ticket_cmd(). check-in: a0b3769b user: dmitry tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/file.c.

140
141
142
143
144
145
146



147
148
149
150
151
152
153
** Return TRUE if the named file is an ordinary file.  Return false
** for directories, devices, fifos, symlinks, etc.
*/
int file_isfile(const char *zFilename){
  return getStat(zFilename, 0) ? 0 : S_ISREG(fileStat.st_mode);
}




int file_wd_isfile(const char *zFilename){
  return getStat(zFilename, 1) ? 0 : S_ISREG(fileStat.st_mode);
}

/*
** Create symlink to file on Unix, or plain-text file with
** symlink target if "allow-symlinks" is off or we're on Windows.







>
>
>







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
** Return TRUE if the named file is an ordinary file.  Return false
** for directories, devices, fifos, symlinks, etc.
*/
int file_isfile(const char *zFilename){
  return getStat(zFilename, 0) ? 0 : S_ISREG(fileStat.st_mode);
}

/*
** Same as file_isfile(), but takes into account symlinks.
*/
int file_wd_isfile(const char *zFilename){
  return getStat(zFilename, 1) ? 0 : S_ISREG(fileStat.st_mode);
}

/*
** Create symlink to file on Unix, or plain-text file with
** symlink target if "allow-symlinks" is off or we're on Windows.