The streamWrapper class

(PHP 4 >= 4.3.2, PHP 5, PHP 7, PHP 8)

Einführung

Allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen(), fread() etc.).

Hinweis:

This is NOT a real class, only a prototype of how a class defining its own protocol should be.

Hinweis:

Implementing the methods in other ways than described here can lead to undefined behaviour.

An instance of this class is initialized as soon as a stream function tries to access the protocol it is associated with.

Klassenbeschreibung

class streamWrapper {
/* Eigenschaften */
/* Methoden */
public function __construct()
public function dir_closedir(): bool
public function dir_opendir(string $path, int $options): bool
public function dir_readdir(): string|bool
public function dir_rewinddir(): bool
public function mkdir(string $path, int $mode, int $options): bool
public function rename(string $path_from, string $path_to): bool
public function rmdir(string $path, int $options): bool
public function stream_cast(int $cast_as): resource|false
public function stream_close(): void
public function stream_eof(): bool
public function stream_flush(): bool
public function stream_lock(int $operation): bool
public function stream_metadata(string $path, int $option, mixed $value): bool
public function stream_open(
    string $path,
    string $mode,
    int $options,
    ?string &$opened_path
): bool
public function stream_read(int $count): string|false
public function stream_seek(int $offset, int $whence): bool
public function stream_set_option(int $option, int $arg1, int $arg2): bool
public function stream_stat(): array|false
public function stream_tell(): int
public function stream_truncate(int $new_size): bool
public function stream_write(string $data): int
public function unlink(string $path): bool
public function url_stat(string $path, int $flags): array|false
public function __destruct()
}

Eigenschaften

resource context

The current context, or null if no context was passed to the caller function.

Use the stream_context_get_options() to parse the context.

Hinweis:

This property must be public so PHP can populate it with the actual context resource.

Inhaltsverzeichnis