Utils.ImageFiles
class Utils.ImageFiles
Contains the code we use to manage the associated image files.Method Inventory
- CopyImages()
- CopyImagesDir()
- GETEXTRAImageFiles()
- GETImageFiles()
- ImageFileBelongsToID()
- IteratorForCopyImages()
- RefreshAllArticleImageFiles()
- RefreshImageFilesForArticle()
- RefreshNavPageImageFiles()
- RemoveImageFilesForID()
Methods
classmethod CopyImages()
classmethod CopyImagesDir(source As %String = "C:\Perforce\iris\2018.1.x\doc\translate\iris-src\GCAS", target As %String = "", verbose As %Boolean = 0, forceLower As %Boolean = 1) as %Integer
Copy all files from source/images to target/images
and return the number of files copied
classmethod GETEXTRAImageFiles(SourceDirectory As %String = "", verbose As %Boolean = 1, forceLower As %Boolean = 1)
Use this to copy image files for an EXTRA item
classmethod GETImageFiles(verbose As %Boolean = 1, which As %String = "", targetdir As %String = "")
Use this to copy image files from their Perforce locations (and on the search path)
which can be a book ID or can be "articles" or can be "" (which means get all image files).
Returns 1 if the given image file belongs to the given DocBookID (given our image file
naming conventions).
classmethod IteratorForCopyImages(source As %String = "", target As %String = "", verbose As %Boolean = 1)
Iterate through all subdirectories of the given source directory. For each, call CopyImagesDir().
and return the number of files copied.
classmethod RefreshAllArticleImageFiles(loaddir="", verbose As %Boolean = 0, forceLower As %Boolean = 1) as %Integer
classmethod RefreshImageFilesForArticle(loaddir, docbookid, verbose As %Boolean = 0, forceLower As %Boolean = 1)
returns the number of deleted files