Manual:LocalFile.php

LocalFile.php contains the class, which extends ) to represent a local file in the wiki's own database. It provides methods to retrieve paths, generate image thumbnails and to let users upload files.

See Manual:File.php for general advice on generating file objects.

Methods
Excluding protected, private and internal methods:


 * Create a LocalFile instance - to be called from inside a Repo class
 * newFromTitle, newFromRow and newFromKey
 * Render
 * prerenderThumbnails
 * Upload
 * upload - Upload a file and record it in the DB
 * recordUpload3, previously recordUpload2
 * publish
 * Move, delete, restore:
 * move
 * deleteFile, deleteOldFile
 * restore
 * Purge:
 * invalidateCache, purgeCache, purgeOldThumbnails, purgeThumbnails
 * DB:
 * upgradeRow
 * File lock
 * acquireFileLock and releaseFileLock - supersede lock and unlock since 1.38
 * Load file metadata:
 * loadFromRow and load
 * Get metadata
 * getMetadataArray and getMetadataItems - supersede getMetadata
 * getJsonMetadata
 * Get description
 * getDescriptionShortUrl, getDescriptionUrl, getDescriptionText, getDescription
 * Get upload information
 * getHistory, nextHistoryLine, resetHistory
 * getTimestamp, getDescriptionTouched
 * getUploader - get the user who uploaded the file
 * Get Repo info
 * getRepo - returns LocalRepo
 * isMissing
 * Get other information
 * getQueryInfo - deprecated since 1.41 in favour of FileSelectQueryBuilder class
 * exists
 * isCacheable
 * getSize, getWidth and getHeight
 * getBitDepth
 * getMimeType and getMediaType
 * getSha1 - get Secure Hash Algorithm 1 (Sha1)

In addition, many other methods are available that are inherited from File class.