Commit 8d9067f0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ea3997a8
......@@ -71,9 +71,11 @@ struct SrvReq;
// WCFS represents filesystem-level connection to wcfs server.
// XXX doc
struct WCFS {
string mountpoint;
Conn *connect(Tid at);
tuple<os::File, error> _open(const string &path /*, XXX mode*/);
string _path(const string &obj);
tuple<os::File, error> _open(const string &path /*, XXX mode*/);
};
// Conn represents logical connection that provides view of data on wcfs
......@@ -269,8 +271,16 @@ void _Mapping::_remmapblk(int64_t blk, Tid at) {
// ---- WCFS raw file access ----
// _path returns path for object on wcfs.
// - str: wcfs root + obj;
string WCFS::_path(const string &obj) {
WCFS *wc = this;
return wc->mountpoint + "/" + obj;
}
tuple<os::File, error> WCFS::_open(const string &path/*, XXX mode*/) {
WCFS *wc = this;
path_ = wc->_path(path);
string path_ = wc->_path(path);
return os::open(path_/*, XXX mode*/);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment