Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileContent.php

interface FileContent

Interface for actual file contents.

@since 1.3.0

Hierarchy

  • interface \org\bovigo\vfs\content\FileContent

Expanded class hierarchy of FileContent

All classes that implement FileContent

2 files declare their use of FileContent
vfsStream.php in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php
vfsStreamFile.php in vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStreamFile.php

File

vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/content/FileContent.php, line 16

Namespace

org\bovigo\vfs\content
View source
interface FileContent {
    
    /**
     * returns actual content
     *
     * @return  string
     */
    public function content();
    
    /**
     * returns size of content
     *
     * @return  int
     */
    public function size();
    
    /**
     * reads the given amount of bytes from content
     *
     * @param   int     $count
     * @return  string
     */
    public function read($count);
    
    /**
     * seeks to the given offset
     *
     * @param   int   $offset
     * @param   int   $whence
     * @return  bool
     */
    public function seek($offset, $whence);
    
    /**
     * checks whether pointer is at end of file
     *
     * @return  bool
     */
    public function eof();
    
    /**
     * writes an amount of data
     *
     * @param   string  $data
     * @return  int amount of written bytes
     */
    public function write($data);
    
    /**
     * Truncates a file to a given length
     *
     * @param   int  $size length to truncate file to
     * @return  bool
     */
    public function truncate($size);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
FileContent::content public function returns actual content 2
FileContent::eof public function checks whether pointer is at end of file 1
FileContent::read public function reads the given amount of bytes from content 1
FileContent::seek public function seeks to the given offset 1
FileContent::size public function returns size of content 2
FileContent::truncate public function Truncates a file to a given length 2
FileContent::write public function writes an amount of data 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal