92 QString now = QTime::currentTime().toString();
97 r->
_data.setObject(o);
111 QString now = QTime::currentTime().toString();
VFS_node is the base class from which all other VFS_node classes derive.
virtual VFS_request * createRequest(VFS_request::requestType type, QString path, QString user="unknown", QJsonDocument data=QJsonDocument(), QJsonObject metadata=QJsonObject(), bool dontDelete=false)
Create a new VFS_request with this object as _origin.
void mounted()
Emitted when a node is mount()ed.
void unmounted(VFS_node *self)
Emitted when a node is unmount()ed.
void diff(VFS_node *origin, VFS_request *t)
Emit a diff, which will trigger notifySubscribers() for a mounted node.
QString className()
Return the class name of a node.
virtual void read(VFS_request *r)
Read the current time.
void startPulse()
Start generating pulses.
Q_INVOKABLE VFS_pulse(int interval=1000)
virtual bool isContainer()
A VFS_pulse node cannot contain children.
virtual void timerEvent(QTimerEvent *event)
When this timer event occurs, generate a VFS_request and emit it.
int _interval
The frequency of the pulse, in milliseconds.
void stopPulse()
Stop pulsing.
int _timerID
The timerID returned by QObject::startTimer()
The base class for all requests between nodes.
bool _success
if the request was successfully completed
QJsonDocument _data
the request payload
static VFS * root()
Return the root node of the VFS filesystem.
static void LOG(QString message, int level=0, QString user="server")
Send a message to the VFS::_messages VFS_stream.
static void ERROR(QString message, int level=0, QString user="server")
Send a message to the VFS::_errors VFS_stream.