Rocketeer API
  • Namespace
  • Class

Namespaces

  • Rocketeer
    • Abstracts
      • Strategies
    • Binaries
      • PackageManagers
    • Console
      • Commands
        • Plugins
      • Compilation
    • Exceptions
    • Facades
    • Interfaces
      • Strategies
    • Plugins
    • Scm
    • Services
      • Connections
      • Display
      • History
      • Ignition
      • Storages
      • Tasks
    • Strategies
      • Check
      • Dependencies
      • Deploy
      • Migrate
      • Test
    • Tasks
      • Plugins
      • Subtasks
    • Traits
      • BashModules

Traits

  • Binaries
  • Core
  • Filesystem
  • Flow

Trait Filesystem

Files and folders handling.

Direct Known Users

Rocketeer\Bash

Indirect Known Users

Rocketeer\Abstracts\AbstractTask, Rocketeer\Abstracts\Strategies\AbstractCheckStrategy, Rocketeer\Strategies\Dependencies\BundlerStrategy, Rocketeer\Strategies\Dependencies\ComposerStrategy, Rocketeer\Strategies\Dependencies\NpmStrategy, Rocketeer\Strategies\Dependencies\PolyglotStrategy, Rocketeer\Strategies\Deploy\CloneStrategy, Rocketeer\Strategies\Deploy\CopyStrategy, Rocketeer\Strategies\Deploy\LocalCloneStrategy, Rocketeer\Strategies\Deploy\SyncStrategy, Rocketeer\Strategies\Migrate\ArtisanStrategy, Rocketeer\Strategies\Test\PhpunitStrategy, Rocketeer\Abstracts\Strategies\AbstractDependenciesStrategy, Rocketeer\Tasks\Check, Rocketeer\Tasks\Cleanup, Rocketeer\Tasks\Closure, Rocketeer\Tasks\CurrentRelease, Rocketeer\Tasks\Dependencies, Rocketeer\Tasks\Deploy, Rocketeer\Tasks\Ignite, Rocketeer\Tasks\Migrate, Rocketeer\Tasks\Plugins\Installer, Rocketeer\Tasks\Rollback, Rocketeer\Abstracts\Strategies\AbstractPolyglotStrategy, Rocketeer\Tasks\Setup, Rocketeer\Tasks\Subtasks\CreateRelease, Rocketeer\Tasks\Subtasks\Notify, Rocketeer\Tasks\Subtasks\Primer, Rocketeer\Tasks\Teardown, Rocketeer\Tasks\Test, Rocketeer\Tasks\Update, Rocketeer\Abstracts\Strategies\AbstractStrategy, Rocketeer\Strategies\Check\NodeStrategy, Rocketeer\Strategies\Check\PhpStrategy, Rocketeer\Strategies\Check\PolyglotStrategy, Rocketeer\Strategies\Check\RubyStrategy, Rocketeer\Strategies\Dependencies\BowerStrategy

Namespace: Rocketeer\Traits\BashModules
Author: Maxime Fabre ehtnam6@gmail.com
Located at Rocketeer/Traits/BashModules/Filesystem.php

Methods summary

public boolean
# isSymlink( string $folder )

Check if a file or folder is a symlink.

Check if a file or folder is a symlink.

Parameters

$folder

Returns

boolean
public string
# symlink( string $folder, string $symlink )

Symlinks two folders.

Symlinks two folders.

Parameters

$folder
The folder in shared/
$symlink
The folder that will symlink to it

Returns

string
protected string
# symlinkSwap( string $folder, string $symlink )

Swap a symlink if possible.

Swap a symlink if possible.

Parameters

$folder
$symlink

Returns

string
public string|null
# move( string $origin, string $destination )

Move a file.

Move a file.

Parameters

$origin
$destination

Returns

string|null
public string
# copy( string $origin, string $destination )

Copy a file.

Copy a file.

Parameters

$origin
$destination

Returns

string
public array
# listContents( string $directory )

Get the contents of a directory.

Get the contents of a directory.

Parameters

$directory

Returns

array
public boolean
# fileExists( string $file )

Check if a file exists.

Check if a file exists.

Parameters

$file
Path to the file

Returns

boolean
public string
# setPermissions( string $folder )

Execute permissions actions on a file with the provided callback.

Execute permissions actions on a file with the provided callback.

Parameters

$folder

Returns

string
public string
# getFile( string $file )

Get the contents of a file.

Get the contents of a file.

Parameters

$file

Returns

string
public
# putFile( string $file, string $contents )

Write to a file.

Write to a file.

Parameters

$file
$contents
public
# upload( string $file, string|null $destination = null )

Upload a local file to remote.

Upload a local file to remote.

Parameters

$file
$destination
public string
# createFolder( string|null $folder = null, boolean $recursive = false )

Create a folder in the application's folder.

Create a folder in the application's folder.

Parameters

$folder
The folder to create
$recursive

Returns

string
The task
public string
# removeFolder( array|string|null $folders = null )

Remove a folder in the application's folder.

Remove a folder in the application's folder.

Parameters

$folders
The folder to remove

Returns

string
The task
protected boolean
# checkStatement( string $condition )

Check a condition via Bash.

Check a condition via Bash.

Parameters

$condition

Returns

boolean
protected string
# fromTo( string $command, string $from, string $to )

Execute a "from/to" style command.

Execute a "from/to" style command.

Parameters

$command
$from
$to

Returns

string
Rocketeer API API documentation generated by ApiGen