HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/triad-infosec/wp-content/plugins/imagify/classes/WriteFile/WriteFileInterface.php
<?php
namespace Imagify\WriteFile;

defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Interface to add and remove contents to a file.
 *
 * @since  1.9
 * @author Grégory Viguier
 */
interface WriteFileInterface {

	/**
	 * Add new contents to the file.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @return bool|\WP_Error True on success. A \WP_Error object on error.
	 */
	public function add();

	/**
	 * Remove the related contents from the file.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @return bool|\WP_Error True on success. A \WP_Error object on error.
	 */
	public function remove();

	/**
	 * Get the path to the file.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @return string
	 */
	public function get_file_path();

	/**
	 * Tell if the file is writable.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @return bool|\WP_Error True if writable. A \WP_Error object if not.
	 */
	public function is_file_writable();

	/**
	 * Get new contents to write into the file.
	 *
	 * @since  1.9
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @return string
	 */
	public function get_new_contents();
}