add nf7::File::Touch()
This commit is contained in:
parent
85f7eccdad
commit
34dff99a1b
@ -86,11 +86,6 @@ class Obj final : public nf7::File,
|
||||
nf7::FileRef src_;
|
||||
|
||||
|
||||
void Touch() noexcept {
|
||||
if (!id()) return;
|
||||
env().Handle({.id = id(), .type = Event::kUpdate});
|
||||
}
|
||||
|
||||
void Reset() noexcept;
|
||||
};
|
||||
|
||||
|
@ -153,9 +153,6 @@ class Network final : public nf7::File,
|
||||
std::make_shared<nf7::GenericContext>(*this, "applying command to redo"),
|
||||
[this]() { history_.ReDo(); });
|
||||
}
|
||||
void Touch() {
|
||||
env().Handle({ .id = id(), .type = Event::kUpdate, });
|
||||
}
|
||||
|
||||
void QueueCommand(const std::shared_ptr<nf7::Context>& ctx,
|
||||
std::unique_ptr<History::Command>&& cmd) noexcept {
|
||||
|
@ -98,9 +98,6 @@ class NativeFile final : public File,
|
||||
nf7::NativeFile>(*this, env().npath()/npath_, flags, exlock);
|
||||
buf_ = std::make_shared<nf7::AsyncBufferAdaptor>(buf, buf);
|
||||
}
|
||||
void Touch() noexcept {
|
||||
env().Handle({.id = id(), .type = Event::kUpdate,});
|
||||
}
|
||||
};
|
||||
|
||||
void NativeFile::Update() noexcept {
|
||||
|
4
nf7.cc
4
nf7.cc
@ -142,6 +142,10 @@ File& File::ancestorOrThrow(size_t dist) const {
|
||||
if (!f) throw NotFoundException("cannot go up over the root");
|
||||
return const_cast<File&>(*f);
|
||||
}
|
||||
void File::Touch() noexcept {
|
||||
if (!id()) return;
|
||||
env().Handle({.id = id(), .type = Event::kUpdate});
|
||||
}
|
||||
|
||||
File::TypeInfo::TypeInfo(const std::string& name,
|
||||
std::unordered_set<std::string>&& flags) noexcept :
|
||||
|
Loading…
x
Reference in New Issue
Block a user