Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active May 5, 2017 13:56
Embed
What would you like to do?
More SSH / SFTP Commands in Laravel 5.x
<?php
// get list of files / directories, returns array
SSH::getGateway()->getConnection()->nlist('.');
// get current working directory, returns string
SSH::getGateway()->getConnection()->pwd();
// check for directory, returns boolean
SSH::getGateway()->getConnection()->is_dir("Directory");
// check for file, returns boolean
SSH::getGateway()->getConnection()->is_file("Directory");
// change to directory, returns boolean
SSH::getGateway()->getConnection()->chdir("Directory");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment