2017 © Pedro Peláez
 

library laravel-ftp

image

dennissmink/laravel-ftp

  • Saturday, July 7, 2018
  • by Cannonb4ll
  • Repository
  • 2 Watchers
  • 10 Stars
  • 3,462 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 14 Versions
  • 53 % Grown

The README.md

LaravelFtp

Laravel FTP client (or any other project that utilises has composer), (*1)

This project is just called LaravelFtp because I am holding this package to the conventions Laravel itself uses, they are great and easy., (*2)

It also utilises the collection package, files are returned as collection so you can use the Collection functions from Laravel., (*3)

Usage

Installation

Require this package with composer:, (*4)

composer require dennissmink/laravel-ftp dev-master

Usage

Initiate a new FTP client like so:, (*5)

$ftp = ftp($host, $user, $pass, $optionalport);

Then, check if your connection was succesfull:, (*6)

if(!$ftp){
    // Connection failed
    return 'Error while connecting to the FTP server';
}

// Do your stuff

Methods, (*7)

General file functions, (*8)

$ftp->all(); // Returns all the files of the users root files (Collection)
$ftp->all('folder'); // Returns all the files of the directory folder (Collection)

$ftp->get('filename.txt') // Returns the content of the file, can also be: get('directory/filename.txt')
$ftp->save('filename.txt', 'content file'); // Save file 'filename.txt' with content 'content file', returns content if success
$ftp->rename('oldname.txt', 'newname.txt'); // Renames file or directory

Create files/directories, (*9)

$ftp->createFile('filename.txt'); // Creates a file with the name 'filename.txt'
$ftp->createDirectory('directory name'); // Creates a directory 'directory name'

Delete files/directories, (*10)

$ftp->deleteFile('filename.txt'); // Deletes a file with the name 'filename.txt'
$ftp->deleteDirectory('directory name'); // Removes a directory with the name 'directory name' (And its contents..)
$ftp->emptyDirectory('directory name'); // Emptys a directory but keeps the directory itself

Packagist: https://packagist.org/packages/dennissmink/laravel-ftp, (*11)

The Versions

07/07 2018

dev-master

9999999-dev

  Sources   Download

The Requires

 

14/09 2017

1.0.75

1.0.75.0

  Sources   Download

The Requires

 

04/08 2017

1.0.74

1.0.74.0

  Sources   Download

The Requires

 

26/07 2017

1.0.73

1.0.73.0

  Sources   Download

The Requires

 

03/03 2017

1.0.72

1.0.72.0

  Sources   Download

The Requires

 

15/02 2017

1.0.71

1.0.71.0

  Sources   Download

The Requires

 

04/02 2017

v2.x-dev

2.9999999.9999999.9999999-dev

  Sources   Download

The Requires

 

04/02 2017

1.0.7

1.0.7.0

  Sources   Download

The Requires

 

01/02 2017

1.0.6

1.0.6.0

  Sources   Download

The Requires

 

30/01 2017

1.0.5

1.0.5.0

  Sources   Download

The Requires

 

26/11 2016

1.0.4

1.0.4.0

  Sources   Download

The Requires

 

26/11 2016

1.0.3

1.0.3.0

  Sources   Download

The Requires

 

26/11 2016

1.0.2

1.0.2.0

  Sources   Download

The Requires

 

17/08 2016

1.0

1.0.0.0

  Sources   Download

The Requires