info_setexists — reads the .info.xml file and determines if the set number mentioned already has an entry in it or not
use Wacs;
use Wacs::WacsId
scalar info_setexists( | ...) ; |
parameter | description |
---|---|
setno | The number of the set to be checked for. |
directory | The directory which should contain the .info.xml file. |
The info_setexists
is used to detect if a set has
already been added to the database via a simple metadata file in XML format.
This metadata file is called .info.xml
and is intended to
superceed the previous mechanism which used individual .info
files within the actual photo set directory for this purpose. This second
source of metadata provides an extremely useful tool in detecting relocations
within the filesystem of the actually media assets being managed. At present
it is primarily manipulated by the wacsupdinfo tool, which
is in turn called by wacsplacemgr in most cases.
The info_setexists
provides a number of return
values depending on what it discovers:
return | description |
---|---|
0 (SUCCESS) | The set already exists in the .info.xml file |
1 (SUCCESS) | The set does not exist yet within the .info.xml file but everything is OK |
-1 (FAILURE) | The file does not exist yet. |
-2 (FAILURE) | The file exists but cannot be written to - most likely permissions |
-3 (FAILURE) | Failure - Unknown reason |