Csync: Add hook for checking if a file is in use already

This commit is contained in:
Markus Goetz 2014-04-28 14:18:58 +02:00
parent 642c16b09b
commit b39359c929
2 changed files with 9 additions and 0 deletions

View file

@ -180,3 +180,10 @@ csync_vio_file_stat_t *csync_vio_convert_file_stat(csync_file_stat_t *st) {
return vfs;
}
bool (*csync_file_locked_or_open_ext) (const char*) = 0; // filled in by library user
bool csync_file_locked_or_open( const char *file) {
if (!csync_file_locked_or_open_ext)
return false;
return csync_file_locked_or_open_ext(file);
}

View file

@ -35,4 +35,6 @@ void csync_win32_set_file_hidden( const char *file, bool hidden );
/* Convert a csync_file_stat_t to csync_vio_file_stat_t */
csync_vio_file_stat_t *csync_vio_convert_file_stat(csync_file_stat_t *st);
bool csync_file_locked_or_open( const char *file);
#endif /* _CSYNC_UTIL_H */