40 , _settingsRoot(settingsRoot)
94 r->
_reason = QString(
"Missing or invalid session. Access was denied for user '%1' on path '%2' ('%3')").arg(r->
_user).arg(r->
_path).arg(r->
_initialPath);
117 QMutexLocker _l(&
_lock);
128 a[it.key()] = it.value()->isContainer();
131 r->
_data = QJsonDocument(a);
QMap< QString, VFS_node * >::iterator VFS_childrenIterator
static bool checkAllowAccess(VFS_session *s, QString path, QString feature="")
Check if a session has access to a resource.
virtual ~VFS_application()
Q_INVOKABLE VFS_application(QString settingsRoot="")
Construct a VFS_application object.
virtual void ls(VFS_request *r)
List the contents of this node.
virtual VFS_node * find(VFS_request *r)
Check if a resource (path) is available for this application.
virtual QByteArray icon()
Fetch the application icon.
virtual void initialize()
The default implementation does nothing.
static char * get(QString which="")
Fetch an icon from the library.
VFS_node is the base class from which all other VFS_node classes derive.
VFS_children _children
This node's children.
static bool __isNode(VFS_node *)
Check to see if a node is in the global registry.
VFS_node * find(QString path)
Find a node by string path.
QMutex _lock
A recursive mutex that is local to this node.
The base class for all requests between nodes.
QString _initialPath
the target path when the request was made (relative to the responder)
QStringList _prefixPath
the prefix elements found while searching for the target
QString _user
who initiated this request, mostly for logging
VFS_session * _session
The session associated with this request. This is an optional value, and care should be taken to chec...
QString _reason
if something (probably bad) happened, this is the reason
QString _path
the target path remnant... the remaining path element once the request has found its target
bool _success
if the request was successfully completed
QJsonDocument _data
the request payload
static VFS * root()
Return the root node of the VFS filesystem.