QUERY FILE EXISTS (Myth Protocol)
Jump to navigation
Jump to search
QUERY_FILE_EXISTS
Arguments
Command arguments: none
List arguments: <string:basename>, <string:storage group>
Response: "0" OR "1[]:[]<path>" OR "1[]:[]<path>[]:[]..."
Examples
Command:
57 QUERY_FILE_EXISTS[]:[]2059_20100414220000.mpg[]:[]Default
Response:
1 0
Command:
57 QUERY_FILE_EXISTS[]:[]2059_20100428220000.mpg[]:[]Default
Response:
56 1[]:[]/srv/mounts/mythbe_1/video/2059_20100428220000.mpg
Description
Queries for existence of a single file.
As of protocol version 65, the storage group is optional. If not specified, "Default" will be used.
Returns
A 1 or a 0 depending on whether the file exists or not. If the file exists, the 1 will be followed by the absolute path to the file. Finally, if a stat on the file succeeds, the information is returned as 13 numeric values in order: st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid, st_rdev, st_size, st_blksize, st_blocks, st_atime, st_mtime, st_ctime.
Changelog
| version | changeset | description |
|---|---|---|
| 49 | [22164] | Initial version |
| 65 | [ed0014b84] | Storage group argument made optional |