PHP 클래스 Platformsh\Cli\Helper\FilesystemHelper

상속: extends Symfony\Component\Console\Helper\Helper, implements Platformsh\Cli\Console\OutputAwareInterface
파일 보기 프로젝트 열기: commerceguys/platform-cli 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$copyOnWindows
$fs
$relative
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface

공개 메소드들

메소드 설명
__construct ( Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, Symfony\Component\Console\Output\OutputInterface $fs = null )
archiveDir ( string $dir, string $destination ) Create a gzipped tar archive of a directory's contents.
copy ( string $source, string $destination, boolean $override = false ) Copy a file, if it is newer than the destination.
copyAll ( string $source, string $destination, array $skip = ['.git', '.DS_Store'], boolean $override = false ) Copy all files and folders between directories.
extractArchive ( string $archive, string $destination ) Extract a gzipped tar archive into the specified destination directory.
getHomeDirectory ( ) : string
getName ( )
makePathAbsolute ( string $relativePath ) : string Make a relative path into an absolute one.
makePathRelative ( string $path1, string $path2 ) : string Make a absolute path into a relative one.
mkdir ( string $dir, integer $mode = 493 )
remove ( string | array | Traversable $files, boolean $retryWithChmod = false ) : boolean Delete a file or directory.
setCopyOnWindows ( boolean $copyOnWindows = true )
setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
setRelativeLinks ( boolean $relative = true ) Set whether to use relative links.
symlink ( $target, $link ) : string Create a symbolic link to a file or directory.
symlinkAll ( string $source, string $destination, boolean $skipExisting = true, boolean $recursive = false, string[] $blacklist = [], boolean $copy = false ) Symlink or copy all files and folders between two directories.

보호된 메소드들

메소드 설명
fixTarPath ( string $path ) : string Fix a path so that it can be used with tar on Windows.
getTarExecutable ( ) : string
inBlacklist ( string $filename, array $blacklist ) : boolean Check if a filename is in the blacklist.
isWindows ( ) : boolean
unprotect ( string | array | Traversable $files, boolean $recursive = false ) : boolean Make files writable by the current user.

메소드 상세

__construct() 공개 메소드

public __construct ( Platformsh\Cli\Helper\ShellHelperInterface $shellHelper = null, Symfony\Component\Console\Output\OutputInterface $fs = null )
$shellHelper Platformsh\Cli\Helper\ShellHelperInterface
$fs Symfony\Component\Console\Output\OutputInterface

archiveDir() 공개 메소드

Create a gzipped tar archive of a directory's contents.
public archiveDir ( string $dir, string $destination )
$dir string
$destination string

copy() 공개 메소드

Copy a file, if it is newer than the destination.
public copy ( string $source, string $destination, boolean $override = false )
$source string
$destination string
$override boolean

copyAll() 공개 메소드

Copy all files and folders between directories.
public copyAll ( string $source, string $destination, array $skip = ['.git', '.DS_Store'], boolean $override = false )
$source string
$destination string
$skip array
$override boolean

extractArchive() 공개 메소드

Extract a gzipped tar archive into the specified destination directory.
public extractArchive ( string $archive, string $destination )
$archive string
$destination string

fixTarPath() 보호된 메소드

Fix a path so that it can be used with tar on Windows.
또한 보기: http://betterlogic.com/roger/2009/01/tar-woes-with-windows/
protected fixTarPath ( string $path ) : string
$path string
리턴 string

getHomeDirectory() 공개 정적인 메소드

public static getHomeDirectory ( ) : string
리턴 string The absolute path to the user's home directory.

getName() 공개 메소드

public getName ( )

getTarExecutable() 보호된 메소드

protected getTarExecutable ( ) : string
리턴 string

inBlacklist() 보호된 메소드

Check if a filename is in the blacklist.
protected inBlacklist ( string $filename, array $blacklist ) : boolean
$filename string
$blacklist array
리턴 boolean

isWindows() 보호된 메소드

protected isWindows ( ) : boolean
리턴 boolean

makePathAbsolute() 공개 메소드

The realpath() function will only work for existing files, and not for symlinks. This is a more flexible solution.
public makePathAbsolute ( string $relativePath ) : string
$relativePath string
리턴 string

makePathRelative() 공개 메소드

Make a absolute path into a relative one.
public makePathRelative ( string $path1, string $path2 ) : string
$path1 string Absolute path.
$path2 string Target path.
리턴 string The first path, made relative to the second path.

mkdir() 공개 메소드

public mkdir ( string $dir, integer $mode = 493 )
$dir string
$mode integer

remove() 공개 메소드

Delete a file or directory.
public remove ( string | array | Traversable $files, boolean $retryWithChmod = false ) : boolean
$files string | array | Traversable A filename, an array of files, or a \Traversable instance to delete.
$retryWithChmod boolean Whether to retry deleting on error, after recursively changing file modes to add read/write/exec permissions. A bit like 'rm -rf'.
리턴 boolean

setCopyOnWindows() 공개 메소드

public setCopyOnWindows ( boolean $copyOnWindows = true )
$copyOnWindows boolean

setOutput() 공개 메소드

public setOutput ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

symlinkAll() 공개 메소드

Symlink or copy all files and folders between two directories.
public symlinkAll ( string $source, string $destination, boolean $skipExisting = true, boolean $recursive = false, string[] $blacklist = [], boolean $copy = false )
$source string
$destination string
$skipExisting boolean
$recursive boolean
$blacklist string[]
$copy boolean

unprotect() 보호된 메소드

Make files writable by the current user.
protected unprotect ( string | array | Traversable $files, boolean $recursive = false ) : boolean
$files string | array | Traversable A filename, an array of files, or a \Traversable instance.
$recursive boolean Whether to change the mode recursively or not.
리턴 boolean True on success, false on failure.

프로퍼티 상세

$copyOnWindows 보호되어 있는 프로퍼티

protected $copyOnWindows

$fs 보호되어 있는 프로퍼티

protected $fs

$relative 보호되어 있는 프로퍼티

protected $relative

$shellHelper 보호되어 있는 프로퍼티

protected ShellHelperInterface,Platformsh\Cli\Helper $shellHelper
리턴 Platformsh\Cli\Helper\ShellHelperInterface