returns a filename where some special char are converted unknown chars are replaced with _
string
checkFileName
(string $fileName, [string $replChar = "_"])
-
string
$fileName
-
string
$replChar
checks slashes in $aFile
string
checkFilePath
(string $aFile)
factories a file object from an file upload
OCSP_FILE;
factoryFromUpload
(array $upload, string $destDir, [boolean $overwrite = True], [boolean $debug = False])
-
array
$upload: ($_FILES['UPLOAD INPUT NAME'])
-
string
$destDir: (destination directory)
-
boolean
$overwrite: (replace existing file?)
-
boolean
$debug
returns if a filename is an absolute path
boolean
isAbsoultePath
(string $aFile)
checks if $aFile is a file
follows symlinks when checking
boolean
isFile
( $aFile)
constructor
OCSP_FILE
__construct
([string $aFile = ""])
deletes the file
void
delete
()
Redefined in descendants as:
returns the file
string
getFile
()
returns absoulute file path
string
getFilePath
()
returns the imagesize array
array
getImagesize
()
returns the mimetype of
string
getMimeType
()
Redefined in descendants as:
returns the file size in bytes
int
getSize
()
returns if the file is an image
boolean
isImage
()
passes the file as is to the browser
void
passthru
()
sets myFilePath
boolean
setFile
(string $aFile)
Redefined in descendants as:
sets the file form an upload
boolean
setFromUplaod
(array $upload, string $destDir, [ $overwrite = False], [ $debug = False])
-
array
$upload
-
string
$destDir
-
$overwrite
-
$debug