Diff
Not logged in

Differences From Artifact [ead3a71e3f]:

To Artifact [b43e89c4bf]:


93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126

127
128
129
130
131
132
133
*/
i64 file_mtime(const char *zFilename){
  return getStat(zFilename) ? -1 : fileStat.st_mtime;
}

/*
** Return TRUE if the named file is an ordinary file or symlink 
** (if symlinks are allowed).
** Return false for directories, devices, fifos, etc.
*/
int file_isfile_or_link(const char *zFilename){
#if !defined(_WIN32)
  if ( g.allowSymlinks ){
    return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode) || S_ISLNK(fileStat.st_mode);
  }else{
    return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode);    
  }
#else
  return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode);
#endif
}

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

/*
** Return TRUE if the named file is a symlink.  Return false
** for all other cases.

** On Windows, always return False.
*/
int file_islink(const char *zFilename){
#if !defined(_WIN32)
  if( g.allowSymlinks ){
    return getStat(zFilename) ? 0 : S_ISLNK(fileStat.st_mode);
  }else{







|
















|
<






|
|
>







93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
*/
i64 file_mtime(const char *zFilename){
  return getStat(zFilename) ? -1 : fileStat.st_mtime;
}

/*
** Return TRUE if the named file is an ordinary file or symlink 
** and symlinks are allowed.
** Return false for directories, devices, fifos, etc.
*/
int file_isfile_or_link(const char *zFilename){
#if !defined(_WIN32)
  if ( g.allowSymlinks ){
    return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode) || S_ISLNK(fileStat.st_mode);
  }else{
    return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode);    
  }
#else
  return getStat(zFilename) ? 0 : S_ISREG(fileStat.st_mode);
#endif
}

/*
** 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 : S_ISREG(fileStat.st_mode);
}

/*
** Return TRUE if the named file is a symlink and symlinks are allowed.
** Return false for all other cases.
**
** On Windows, always return False.
*/
int file_islink(const char *zFilename){
#if !defined(_WIN32)
  if( g.allowSymlinks ){
    return getStat(zFilename) ? 0 : S_ISLNK(fileStat.st_mode);
  }else{