PHP 8.3.4 Released!

streamWrapper::rename

(PHP 5, PHP 7, PHP 8)

streamWrapper::renameRenames a file or directory

Beschreibung

public streamWrapper::rename(string $path_from, string $path_to): bool

This method is called in response to rename().

Should attempt to rename path_from to path_to

Hinweis:

In order for the appropriate error message to be returned this method should not be defined if the wrapper does not support renaming files.

Parameter-Liste

path_from

The URL to the current file.

path_to

The URL which the path_from should be renamed to.

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Fehler/Exceptions

Wirft E_WARNING, wenn der Aufruf dieser Methode fehlschlug (z. B. weil sie nicht implementiert ist).

Anmerkungen

Hinweis:

Die streamWrapper::$context-Eigenschaft wird, wenn verfügbar, aktualisiert, wenn der aufrufenden Funktion ein gültiger Kontext übergeben wurde.

Siehe auch

  • rename() - Benennt eine Datei oder ein Verzeichnis um

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top