PHP Класс NFePHP\Common\Files\FilesFolders

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$ambientes
$subdirs

Открытые методы

Метод Описание
createFolder ( string $folder ) createFolder
createFolders ( string $dirPath ) : boolean createFolders Cria a estrutura de diretorios para a guarda dos arquivos
getAmbiente ( string $tpAmb = '2' ) : string getAmbiente
getFilePath ( string $tpAmb = '2', string $dirbase = '', string $subdir = '' ) : string getFilePath
listDir ( $folder, string $fileMatch = '*-nfe.xml', boolean $retpath = false ) : array listDir Obtem todo o conteúdo de um diretorio, e que atendam ao critério indicado.
readFile ( string $pathFile = '' ) : string readFile
removeFile ( string $pathFile = '' ) : boolean removeFile
removeFolder ( string $dirPath ) : boolean Apaga um diretorio e todo o seu conteúdo
saveFile ( string $path = '', string $filename = '', string $content = '' ) : boolean saveFile
writeTest ( string $path = '', string $message = '', string &$respHtml = '' ) : boolean Rotina para teste de escrita no path especificado Usada na rotina de configuração (install.php)

Описание методов

createFolder() публичный статический метод

createFolder
public static createFolder ( string $folder )
$folder string

createFolders() публичный статический метод

createFolders Cria a estrutura de diretorios para a guarda dos arquivos
public static createFolders ( string $dirPath ) : boolean
$dirPath string path do diretorio a ser criado
Результат boolean

getAmbiente() публичный статический метод

getAmbiente
public static getAmbiente ( string $tpAmb = '2' ) : string
$tpAmb string
Результат string

getFilePath() публичный статический метод

getFilePath
public static getFilePath ( string $tpAmb = '2', string $dirbase = '', string $subdir = '' ) : string
$tpAmb string
$dirbase string
$subdir string
Результат string

listDir() публичный статический метод

listDir Obtem todo o conteúdo de um diretorio, e que atendam ao critério indicado.
public static listDir ( $folder, string $fileMatch = '*-nfe.xml', boolean $retpath = false ) : array
$fileMatch string Critério de seleção pode ser usados coringas como *-nfe.xml
$retpath boolean se true retorna o path completo dos arquivos se false so retorna o nome dos arquivos
Результат array com os nome dos arquivos que atendem ao critério estabelecido ou false

readFile() публичный статический метод

readFile
public static readFile ( string $pathFile = '' ) : string
$pathFile string
Результат string

removeFile() публичный статический метод

removeFile
public static removeFile ( string $pathFile = '' ) : boolean
$pathFile string
Результат boolean

removeFolder() публичный статический метод

Apaga um diretorio e todo o seu conteúdo
public static removeFolder ( string $dirPath ) : boolean
$dirPath string
Результат boolean

saveFile() публичный статический метод

saveFile
public static saveFile ( string $path = '', string $filename = '', string $content = '' ) : boolean
$path string
$filename string
$content string
Результат boolean

writeTest() публичный статический метод

Rotina para teste de escrita no path especificado Usada na rotina de configuração (install.php)
public static writeTest ( string $path = '', string $message = '', string &$respHtml = '' ) : boolean
$path string
$message string
$respHtml string passado por referencia irá conter a resposta em html
Результат boolean

Описание свойств

$ambientes защищенное статическое свойство

protected static $ambientes

$subdirs защищенное статическое свойство

protected static $subdirs