From b9b932d7b58f51ba843443941355f2d5a83fac7d Mon Sep 17 00:00:00 2001 From: Jonas Quinten Date: Tue, 7 Mar 2023 11:46:25 +0100 Subject: [PATCH] feat: added Documentation --- docs/remotes/README.md | 3 ++- docs/remotes/ftp-file.md | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 docs/remotes/ftp-file.md diff --git a/docs/remotes/README.md b/docs/remotes/README.md index 8d057b0..e27e132 100644 --- a/docs/remotes/README.md +++ b/docs/remotes/README.md @@ -1,2 +1,3 @@ # Remotes -- [Sftp File](sftp-file.md) \ No newline at end of file +- [Sftp File](sftp-file.md) +- [Ftp File](ftp-file.md) diff --git a/docs/remotes/ftp-file.md b/docs/remotes/ftp-file.md new file mode 100644 index 0000000..0115050 --- /dev/null +++ b/docs/remotes/ftp-file.md @@ -0,0 +1,21 @@ +# Ftp File +Class: [FtpFile](/src/Remote/FtpFile.php) + +## Difference to Base File +### Ftp File creation +```php +use Ambimax\File\Remote\FtpFile; +use Ambimax\File\FileMode; + +$ftoFile = new FtpFile( + hostname: 'example.com', + username: 'user', + password: 'password123', + filePath: 'foo/bar/baz.txt', + mode: FileMode::R, + overwrite: true // optional, default = false +); +``` + +### Rename/Move +The implementation of rename and move of FtpFile do not reopen the file.