Lines Matching defs:file
817 * Get a media file's content
819 * Returns the content of the given media file. When no revision is given, the current revision is returned.
822 * @param string $media file id
824 * @return string Base64 encoded media file contents
834 throw new AccessDeniedException('You are not allowed to read this media file', 211);
837 $file = mediaFN($media, $rev);
838 if (!@ file_exists($file)) {
839 throw new RemoteException('The requested media file (revision) does not exist', 221);
842 $data = io_readFile($file, false);
847 * Return info about a media file
849 * The call will return an error if the requested media file does not exist.
851 * Read access is required for the media file.
853 * @param string $media file id
866 throw new AccessDeniedException('You are not allowed to read this media file', 211);
869 throw new RemoteException('The requested media file does not exist', 221);
880 * Returns the pages that use a given media file
882 * The call will return an error if the requested media file does not exist.
884 * Read access is required for the media file.
888 * @param string $media file id
897 throw new AccessDeniedException('You are not allowed to read this media file', 211);
900 throw new RemoteException('The requested media file does not exist', 221);
907 * Uploads a file to the wiki
909 * The file data has to be passed as a base64 encoded string.
913 * @param string $base64 Base64 encoded file contents
914 * @param bool $overwrite Should an existing file be overwritten?
943 throw new RemoteException('Empty file given', 235);
946 // save temporary file
960 * Deletes a file from the wiki
962 * You need to have delete permissions for the file.
967 * @throws RemoteException file in use or not deleted
980 throw new AccessDeniedException('You are not allowed to delete this media file', 212);
982 throw new RemoteException('Media file is still referenced', 232);
984 throw new RemoteException('The media file requested to delete does not exist', 221);
986 throw new RemoteException('Failed to delete media file', 233);