It would be useful if the agent in addition to just reporting if a file exists, it meets certain requirements if it indeed exists.
Things I can come up with:
- is the file a directory/file/symlink/block device/character device?
- does the file have the proper permissions (possibly using some kind of wildcard to just check the permissions of the owner, group or others)
- is the file ownership correct? (via uid/gid or names)
- is the file readable/writeable/executable by the user running the agent?
In my usecase, permissions and ownership would be the most important tests.
The manual page for the 'test' utility might provide some other inspiration as well.
These things could be assigned to vfs.file.exists as positional parameters to retain compatibility with the current functionality.