| 176 | */ |
| 177 | |
| 178 | file_info_t * file_query( OBJECT * const path ) |
| 179 | { |
| 180 | /* FIXME: Add tracking for disappearing files (i.e. those that can not be |
| 181 | * detected by stat() even though they had been detected successfully |
| 182 | * before) and see how they should be handled in the rest of Boost Jam code. |
| 183 | * Possibly allow Jamfiles to specify some files as 'volatile' which would |
| 184 | * make Boost Jam avoid caching information about those files and instead |
| 185 | * ask the OS about them every time. |
| 186 | */ |
| 187 | int found; |
| 188 | file_info_t * const ff = file_info( path, &found ); |
| 189 | if ( !found ) |
| 190 | { |
| 191 | file_query_( ff ); |
| 192 | if ( ff->exists ) |
| 193 | { |
| 194 | /* Set the path's timestamp to 1 in case it is 0 or undetected to avoid |
| 195 | * confusion with non-existing paths. |
| 196 | */ |
| 197 | if ( timestamp_empty( &ff->time ) ) |
| 198 | timestamp_init( &ff->time, 1, 0 ); |
| 199 | } |
| 200 | } |
| 201 | if ( !ff->exists ) |
| 202 | { |
| 203 | return 0; |
| 204 | } |
| 205 | return ff; |
| 206 | } |
| 207 | |
| 208 | |
| 209 | /* |
no test coverage detected