PHP 클래스 Valet\Filesystem

파일 보기 프로젝트 열기: laravel/valet 1 사용 예제들

공개 메소드들

메소드 설명
append ( string $path, string $contents, string | null $owner = null ) : void Append the contents to the given file.
appendAsUser ( string $path, string $contents ) : void Append the contents to the given file as the non-root user.
chgrp ( string $path, string $group ) Change the group of the given path.
chown ( string $path, string $user ) Change the owner of the given path.
copy ( string $from, string $to ) : void Copy the given file to a new location.
copyAsUser ( string $from, string $to ) : void Copy the given file to a new location for the non-root user.
ensureDirExists ( string $path, string | null $owner = null, integer $mode = 493 ) : void Ensure that the given directory exists.
exists ( string $path ) : boolean Determine if the given file exists.
get ( string $path ) : string Read the contents of the given file.
isBrokenLink ( string $path ) : boolean Determine if the given path is a broken symbolic link.
isDir ( string $path ) : boolean Determine if the given path is a directory.
isLink ( string $path ) : boolean Determine if the given path is a symbolic link.
mkdir ( string $path, string | null $owner = null, integer $mode = 493 ) : void Create a directory.
mkdirAsUser ( string $path, integer $mode = 493 ) : void Create a directory as the non-root user.
put ( string $path, string $contents, string | null $owner = null ) : string Write to the given file.
putAsUser ( string $path, string $contents ) : string Write to the given file as the non-root user.
readLink ( string $path ) : string Resolve the given symbolic link.
realpath ( string $path ) : string Resolve the given path.
removeBrokenLinksAt ( string $path ) : void Remove all of the broken symbolic links at the given path.
scandir ( string $path ) : array Scan the given directory path.
symlink ( string $target, string $link ) : void Create a symlink to the given target.
symlinkAsUser ( string $target, string $link ) : void Create a symlink to the given target for the non-root user.
touch ( string $path, string | null $owner = null ) : string Touch the given path.
touchAsUser ( string $path ) : void Touch the given path as the non-root user.
unlink ( string $path ) : void Delete the file at the given path.

메소드 상세

append() 공개 메소드

Append the contents to the given file.
public append ( string $path, string $contents, string | null $owner = null ) : void
$path string
$contents string
$owner string | null
리턴 void

appendAsUser() 공개 메소드

Append the contents to the given file as the non-root user.
public appendAsUser ( string $path, string $contents ) : void
$path string
$contents string
리턴 void

chgrp() 공개 메소드

Change the group of the given path.
public chgrp ( string $path, string $group )
$path string
$group string

chown() 공개 메소드

Change the owner of the given path.
public chown ( string $path, string $user )
$path string
$user string

copy() 공개 메소드

Copy the given file to a new location.
public copy ( string $from, string $to ) : void
$from string
$to string
리턴 void

copyAsUser() 공개 메소드

Copy the given file to a new location for the non-root user.
public copyAsUser ( string $from, string $to ) : void
$from string
$to string
리턴 void

ensureDirExists() 공개 메소드

Ensure that the given directory exists.
public ensureDirExists ( string $path, string | null $owner = null, integer $mode = 493 ) : void
$path string
$owner string | null
$mode integer
리턴 void

exists() 공개 메소드

Determine if the given file exists.
public exists ( string $path ) : boolean
$path string
리턴 boolean

get() 공개 메소드

Read the contents of the given file.
public get ( string $path ) : string
$path string
리턴 string

isDir() 공개 메소드

Determine if the given path is a directory.
public isDir ( string $path ) : boolean
$path string
리턴 boolean

mkdir() 공개 메소드

Create a directory.
public mkdir ( string $path, string | null $owner = null, integer $mode = 493 ) : void
$path string
$owner string | null
$mode integer
리턴 void

mkdirAsUser() 공개 메소드

Create a directory as the non-root user.
public mkdirAsUser ( string $path, integer $mode = 493 ) : void
$path string
$mode integer
리턴 void

put() 공개 메소드

Write to the given file.
public put ( string $path, string $contents, string | null $owner = null ) : string
$path string
$contents string
$owner string | null
리턴 string

putAsUser() 공개 메소드

Write to the given file as the non-root user.
public putAsUser ( string $path, string $contents ) : string
$path string
$contents string
리턴 string

realpath() 공개 메소드

Resolve the given path.
public realpath ( string $path ) : string
$path string
리턴 string

removeBrokenLinksAt() 공개 메소드

Remove all of the broken symbolic links at the given path.
public removeBrokenLinksAt ( string $path ) : void
$path string
리턴 void

scandir() 공개 메소드

Scan the given directory path.
public scandir ( string $path ) : array
$path string
리턴 array

symlinkAsUser() 공개 메소드

This uses the command line as PHP can't change symlink permissions.
public symlinkAsUser ( string $target, string $link ) : void
$target string
$link string
리턴 void

touch() 공개 메소드

Touch the given path.
public touch ( string $path, string | null $owner = null ) : string
$path string
$owner string | null
리턴 string

touchAsUser() 공개 메소드

Touch the given path as the non-root user.
public touchAsUser ( string $path ) : void
$path string
리턴 void