|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IFileStatus
An interface to get the status of a file on a MythTV backend.
This interface represents the response to a IBackend.queryCheckFile
or IBackend.queryFileExists request.
This interface is property-aware. See the properties-list for all properties of a file-status object.
IBackend backend = ....; // an already connected backend IProgramInfo program = ....; // a previously recorded program // query if the preview image exists String previewImageName = program.getPreviewImageName(); IFileStatus fileStatus = backend.queryFileExists(previewImageName,"Default"); if (fileStatus.fileExists()) { System.out.println("Preview image found: " + fileStatus.getFilePath()); } else { System.out.println("Preview image not found."); }
<0>FILE_EXISTS: true | <1>FILE_PATH: /var/lib/mythtv/recordings//1063_20110329201000.mpg.png <0>FILE_EXISTS: true | <1>FILE_PATH: /var/lib/mythtv/livetv/1063_20110410104434.mpg <00>FILE_EXISTS: true | <01>FILE_PATH: /var/lib/mythtv/recordings//1000_20110701123000.mpg | <02>DEV: 2049 | <03>INO: 136043 | <04>MODE: 33188 | <05>NLINK: 1 | <06>UID: 109 | <07>GID: 117 | <08>RDEV: 0 | <09>FILE_SIZE: 65792000 | <10>BLKSIZE: 4096 | <11>BLOCKS: 128504 | <12>ATIME: Fri Jul 01 12:30:09 CEST 2011 | <13>MTIME: Fri Jul 01 12:31:00 CEST 2011 | <14>CTIME: Fri Jul 01 12:31:00 CEST 2011
IBackend.queryCheckFile(org.jmythapi.protocol.response.IProgramInfo, java.lang.Boolean),
IBackend.queryFileExists(org.jmythapi.protocol.response.IProgramInfo),
QUERY_CHECKFILE,
QUERY_FILE_EXISTS| Nested Class Summary | |
|---|---|
static class |
IFileStatus.Props
The properties of an IFileStatus response. |
| Method Summary | |
|---|---|
boolean |
fileExists()
Checks if the queried file exists. |
String |
getFilePath()
Gets the full path of queried file. |
Long |
getFileSize()
Gets the size of the file in bytes. |
Date |
getLastModified()
|
| Methods inherited from interface org.jmythapi.IVersionable |
|---|
getVersionNr |
| Methods inherited from interface org.jmythapi.IPropertyAware |
|---|
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject |
| Method Detail |
|---|
boolean fileExists()
true if the queried file exists.String getFilePath()
null if the file was not found.Long getFileSize()
Date getLastModified()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||