Yoast\WP\SEO\Llms_Txt\Domain\File

Llms_File_System_Interface{}interfaceYoast 1.0

Interface to describe handeling the llms.txt file.

Хуков нет.

Использование

$Llms_File_System_Interface = new Llms_File_System_Interface();
// use class methods

Методы

  1. public file_exists()
  2. public get_file_contents()
  3. public remove_file()
  4. public set_file_content( string $content )

Код Llms_File_System_Interface{} Yoast 27.7

interface Llms_File_System_Interface {

	/**
	 * Method to set the llms.txt file content.
	 *
	 * @param string $content The content for the file.
	 *
	 * @return bool True on success, false on failure.
	 */
	public function set_file_content( string $content ): bool;

	/**
	 * Method to remove the llms.txt file from the file system.
	 *
	 * @return bool True on success, false on failure.
	 */
	public function remove_file(): bool;

	/**
	 * Gets the contents of the current llms.txt file.
	 *
	 * @return string
	 */
	public function get_file_contents(): string;

	/**
	 * Checks if the llms.txt file exists.
	 *
	 * @return bool Whether the llms.txt file exists.
	 */
	public function file_exists(): bool;
}