Difference between revisions of "QUERY FILE EXISTS (Myth Protocol)"
From MythTV Official Wiki
(added additional response values that come with a successful check) |
(note that in protocol 65, the storage group argument is now optional) |
||
Line 20: | Line 20: | ||
=== Description === | === Description === | ||
Queries for existence of a single file. | 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 === | === Returns === | ||
Line 32: | Line 34: | ||
| 49 || {{changeset|22164}} | | 49 || {{changeset|22164}} | ||
| Initial version | | Initial version | ||
+ | |- | ||
+ | | 65 || {{changeset|ed0014b84}} | ||
+ | | Storage group argument made optional | ||
|- | |- | ||
|} | |} | ||
[[Category:Myth Protocol Commands]] | [[Category:Myth Protocol Commands]] |
Latest revision as of 20:13, 16 March 2011
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 |