1.1 --- a/libfsserver/lib/files/ext2_file_operations.cc Sun Aug 01 22:48:12 2021 +0200
1.2 +++ b/libfsserver/lib/files/ext2_file_operations.cc Mon Aug 02 19:39:10 2021 +0200
1.3 @@ -25,6 +25,22 @@
1.4
1.5 #include "ext2_file_operations.h"
1.6
1.7 +/* Object type tests. */
1.8 +
1.9 +bool Ext2FileOperations::is_directory(ext2_ino_t ino_file)
1.10 +{
1.11 + std::lock_guard<std::mutex> guard(_lock);
1.12 +
1.13 + return _image_isdir(_fs, ino_file);
1.14 +}
1.15 +
1.16 +bool Ext2FileOperations::is_file(ext2_ino_t ino_file)
1.17 +{
1.18 + std::lock_guard<std::mutex> guard(_lock);
1.19 +
1.20 + return _image_isfile(_fs, ino_file);
1.21 +}
1.22 +
1.23 /* Create a file in the directory indicated by the given inode number with the
1.24 given filename. The file is created with the given user permissions. */
1.25