Last active
May 5, 2017 13:56
-
-
Save niraj-shah/2d9d8ce2f3193f795a5c133cebb6476a to your computer and use it in GitHub Desktop.
More SSH / SFTP Commands in Laravel 5.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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