Inherits Serializable.
Inherited by Image.
reprezentuje soubor/adresar na disku, je schopno rict jestli se jedna o adresar, soubor potom mimeType, velikost, cas vytvoreni atd.
filesystemova cesta se pise s normalnimi lomitky nehlede na os zapisuje se bez koncoveho lomitka
$webURI obsahuje cestu pod kterou by mel byt soubor dostupny
pouziva: http://php.net/manual/en/class.splfileobject.php http://www.phpro.org/tutorials/Introduction-to-SPL.html#14 https://www.inanimatt.com/php-files.html
◆ __construct()
| __construct |
( |
|
$path, |
|
|
|
$webURI = NULL |
|
) |
| |
- Parameters
-
| string | $path | string, ktery reprezentuje cestu k souboru nebo Adresar do ktereho se ma zapsat novy soubor |
| string | $webURI | pod jakou cestou ma byt dostupne na webu |
◆ createdDate()
vrati datum posledni modifikace souboru
- Returns
- Date datum posledni modifikace pokud je dostupna
◆ createFile()
| static createFile |
( |
|
$path | ) |
|
|
static |
◆ delete()
◆ exists()
- Returns
- boolean tests if file exists
◆ getDir()
- Returns
- string vraci v jakem adresari se nachazi
◆ getExtension()
◆ getFileContent()
◆ getFileExtension()
Return file extension example 'zip' , 'jpg'
- Returns
- string
◆ getFileName()
cisty nazev souboru bez adresare kde se nachazi
- Returns
- string
◆ getFileSize()
return file size in bytes
- Returns
- int
◆ getFsPath()
vrati absolutni path, kde se soubor nachazi na disku
◆ getMimeType()
- Returns
- string vraci mime-type
◆ getMineType()
- Deprecated:
- use getMimeType
- Returns
- string vraci mime-type
◆ getSafeFileName()
| static getSafeFileName |
( |
|
$name | ) |
|
|
static |
funkce vraci "bezpecny" nazev souboru s tim, ze jej prevede na mala pismenka
- Parameters
-
- Returns
- string protected
◆ getWebURI()
◆ isDir()
zjisti jestli je
- Returns
- boolean true pokud je soubor
◆ isFile()
zjisti jestli je soubor
- Returns
- boolean true if this object is file
◆ isLink()
zjisti jestli je hard nebo soft link na unixech nebo junction na windows?
◆ lastModifiedDate()
vrati datum posledni modifikace souboru
- Returns
- Date datum posledni modifikace pokud je dostupna
◆ serialize()
implements Serializable interface serialize
- Returns
- string serialized object
◆ unserialize()
| unserialize |
( |
|
$serialized | ) |
|
implements Serializable interface serialize
- Parameters
-
◆ write()
Zapise do souboru
- Parameters
-
- Returns
- integer pocet zapsanych znaku
◆ $file
◆ $fileInfo
◆ $mimeType
◆ $webURI
The documentation for this class was generated from the following file: