1.1 --- a/libfsserver/include/fsserver/host_file_opener.h Wed Feb 09 22:30:29 2022 +0100
1.2 +++ b/libfsserver/include/fsserver/host_file_opener.h Thu Feb 10 17:55:05 2022 +0100
1.3 @@ -32,6 +32,7 @@
1.4 /* Collection data types. */
1.5
1.6 typedef std::map<std::string, fileid_t> HostFileIdentifiers;
1.7 +typedef std::map<fileid_t, std::string> HostFilePaths;
1.8
1.9
1.10
1.11 @@ -45,14 +46,17 @@
1.12 /* File identifier register. */
1.13
1.14 HostFileIdentifiers _fileids;
1.15 + HostFilePaths _paths;
1.16
1.17 virtual fileid_t _get_fileid(const char *path, bool create);
1.18
1.19 + virtual const char *_get_path(fileid_t fileid);
1.20 +
1.21 /* Convenience methods determining different object types. */
1.22
1.23 - virtual bool accessing_directory(const char *path, flags_t flags, fileid_t fileid);
1.24 + virtual bool accessing_directory(flags_t flags, fileid_t fileid);
1.25
1.26 - virtual bool accessing_file(const char *path, flags_t flags, fileid_t fileid);
1.27 + virtual bool accessing_file(flags_t flags, fileid_t fileid);
1.28
1.29 public:
1.30 explicit HostFileOpener(ResourceRegistry *registry)
1.31 @@ -66,19 +70,17 @@
1.32
1.33 virtual long get_fileid(const char *path, flags_t flags, fileid_t *fileid);
1.34
1.35 - virtual long make_accessor(const char *path, flags_t flags, fileid_t fileid,
1.36 + virtual long make_accessor(flags_t flags, fileid_t fileid,
1.37 Accessor **accessor);
1.38
1.39 - virtual long make_directory_accessor(const char *path, flags_t flags,
1.40 - fileid_t fileid,
1.41 + virtual long make_directory_accessor(flags_t flags, fileid_t fileid,
1.42 DirectoryAccessor **accessor);
1.43
1.44 - virtual long remove_object(const char *path, fileid_t fileid);
1.45 + virtual long remove_object(fileid_t fileid);
1.46
1.47 - virtual long rename_object(const char *source, fileid_t source_fileid,
1.48 - const char *target);
1.49 + virtual long rename_object(const char *source, const char *target);
1.50
1.51 - virtual long unlink_object(const char *path, fileid_t fileid);
1.52 + virtual long unlink_object(fileid_t parent_fileid, fileid_t fileid);
1.53 };
1.54
1.55 // vim: tabstop=4 expandtab shiftwidth=4