PHP Interface PiPHP\GPIO\FileSystem\FileSystemInterface

Afficher le fichier Open project: piphp/gpio

Méthodes publiques

Méthode Description
getContents ( string $path ) : string Read the contents of a file.
open ( string $path, string $mode ) : resource Open a file.
putContents ( string $path, string $buffer ) : integer Write a buffer to a file.

Method Details

getContents() public méthode

Read the contents of a file.
public getContents ( string $path ) : string
$path string The path of the file to read
Résultat string The file contents

open() public méthode

Open a file.
public open ( string $path, string $mode ) : resource
$path string The path of the file to open
$mode string The mode to open the file in (see fopen())
Résultat resource A stream resource.

putContents() public méthode

Write a buffer to a file.
public putContents ( string $path, string $buffer ) : integer
$path string The path of the file to write to
$buffer string The buffer to write
Résultat integer The number of bytes written