[file] element index

Package indexes

All elements
a c d e f g h i k l m n o p q r s t u w
a
top
Variable $allowed_types
Array of allowed mimetypes (unset = any types)
Constant ABANDON_FILE
ABANDON_FILE in file-defs.php
Abandon file on close
c
top
Variable $content
inputfile::$content in file-defs.php
Content of file after readall()
Variable $created
quickfile::$created in file-defs.php
True if quickfile was created successfully
Method closefile
outputfile::closefile() in file-defs.php
Close the file. We move the temporary file that has been built to
Method closefile
inputfile::closefile() in file-defs.php
Close the file
Method create
lockfile::create() in lockfile-defs.php
Create the lockfile. We only do this, obviously, if it doesn't already exist. If it DOES exist, then we make a lot of checks. If time-limits are set we possibly try to kill the process and remove the lockfile before creating our new one.
Method csv_inputfile
Constructor Open the given CSV formatted file for input.
Class csv_inputfile
csv_inputfile in file-defs.php
CSV Inputfile class Manage CSV-formatted files for input.
d
top
Variable $datafname
outputfile::$datafname in file-defs.php
The full path to the file
Variable $datafname
inputfile::$datafname in file-defs.php
The full path to the file
Variable $destination_dir
Destination dir to put files
Variable $dir
outputfile::$dir in file-defs.php
The directory prefix (if any) of the file
Variable $dir
inputfile::$dir in file-defs.php
The directory prefix (if any) of the file
e
top
Variable $errcode
fileupload::$errcode in file-defs.php
Error code. Check to see if error occurred.
Variable $errmsg
fileupload::$errmsg in file-defs.php
Error message array, goes with errcode.
Variable $errorcode
lockfile::$errorcode in lockfile-defs.php
Latest error code
Variable $exists
lockfile::$exists in lockfile-defs.php
True if the lockfile exists
Method eof
inputfile::eof() in file-defs.php
Return true if at end-of-file or not opened, else false
Method errormsg
lockfile::errormsg() in lockfile-defs.php
Return any lockfile error message
Method error_message
Return any error message(s).
f
top
Variable $fieldname
fileupload::$fieldname in file-defs.php
Upload field name
Variable $filename
fileupload::$filename in file-defs.php
Original filename
Variable $filepath
fileupload::$filepath in file-defs.php
Upload path to the file on the server
Variable $filesize
fileupload::$filesize in file-defs.php
Physical size of the file (bytes)
Variable $filesize
inputfile::$filesize in file-defs.php
Size of opened file in bytes
Variable $filetype
outputfile::$filetype in file-defs.php
Type of file 'text' or 'templated'
Variable $fp
inputfile::$fp in file-defs.php
The file pointer
Variable $fp
outputfile::$fp in file-defs.php
File pointer
Variable $freezefilename
lockfile::$freezefilename in lockfile-defs.php
Name of freeze lockfile to create (internal)
Variable $freezesecs
lockfile::$freezesecs in lockfile-defs.php
Lockfile age at which we should stop trying to kill hung process
Variable $frozen
lockfile::$frozen in lockfile-defs.php
True if the freeze lockfile exists
Page file-defs.php
file-defs.php in file-defs.php
Method fileupload
fileupload::fileupload() in file-defs.php
Constructor. On instantiation this class checks the global variable space for uploaded file info and pre-processes it.
Class fileupload
fileupload in file-defs.php
Fileupload class.
Method flushbuffer
outputfile::flushbuffer() in file-defs.php
Flush any buffered content to the stream.
g
top
Method get_current
fileupload::get_current() in file-defs.php
Acquire the details on the current upload file. This includes the
Function get_dirlist
get_dirlist() in file-defs.php
Returns an array containing full paths to the files in the directory
Function get_file_extn
get_file_extn() in file-defs.php
Return the file extension from a filepath.
Function get_file_stem
get_file_stem() in file-defs.php
Return the file stem (name without extn) from a filepath.
Method get_first
fileupload::get_first() in file-defs.php
Acquire the details on the first upload file.
Method get_last
fileupload::get_last() in file-defs.php
Get details on the last file which was uploaded. If there are no more, then this function returns false.
Method get_next
fileupload::get_next() in file-defs.php
Get details on the next file which was uploaded. If there are no more, then this function returns false.
Method get_previous
Get details on the previous file which was uploaded. If there are no more, then this function returns false.
h
top
Variable $hasfiles
fileupload::$hasfiles in file-defs.php
True if some files were uploaded
i
top
Method inputfile
inputfile::inputfile() in file-defs.php
Constructor Open the given file for input.
Class inputfile
inputfile in file-defs.php
The inputfile class manages files for input. It opens, reads and closes files in input-only mode.
k
top
Variable $killsecs
lockfile::$killsecs in lockfile-defs.php
Lockfile age at which we should assume process is hung
l
top
Variable $lockfilename
lockfile::$lockfilename in lockfile-defs.php
Name of the lockfile to create
Variable $lock_mins
lockfile::$lock_mins in lockfile-defs.php
Minutes process has been locked for
Constant LCK_E_CREFAIL
LCK_E_CREFAIL in lockfile-defs.php
Lockfile
Constant LCK_E_FROZEN
LCK_E_FROZEN in lockfile-defs.php
Lockfile was frozen
Constant LCK_E_IMMORTAL
LCK_E_IMMORTAL in lockfile-defs.php
Lockfile process could not be killed
Constant LCK_E_KILLED
LCK_E_KILLED in lockfile-defs.php
Lockfile process was killed
Constant LCK_E_KILLED9
LCK_E_KILLED9 in lockfile-defs.php
Lockfile process was killed with -9
Constant LCK_E_OK
LCK_E_OK in lockfile-defs.php
Lockfile created ok
Constant LCK_E_ORPHAN
LCK_E_ORPHAN in lockfile-defs.php
Lockfile is orphaned (no associated process)
Constant LCK_E_READFAIL
LCK_E_READFAIL in lockfile-defs.php
Lockfile could not be read
Class lockfile
lockfile in lockfile-defs.php
A class to handle a lockfile for a running process. The idea is you
Method lockfile
lockfile::lockfile() in lockfile-defs.php
Make a new lockfile handler object.
Page lockfile-defs.php
lockfile-defs.php in lockfile-defs.php
m
top
Variable $max_size
fileupload::$max_size in file-defs.php
Max filesize, else delete (0 = any size)
Variable $messages
lockfile::$messages in lockfile-defs.php
Latest error message
Variable $mimetype
fileupload::$mimetype in file-defs.php
Mime type of the the file
Function mkpath
mkpath() in file-defs.php
Make sure path exists A utility function which makes sure a given directory path is made, using mkdir as required. This function assumes that permissions are all as needed.
n
top
Variable $name
outputfile::$name in file-defs.php
The file name
Variable $name
inputfile::$name in file-defs.php
The file name
o
top
Variable $opened
outputfile::$opened in file-defs.php
True if file was sucessfully opened
Variable $opened
inputfile::$opened in file-defs.php
True if file was opened
Method outputfile
outputfile::outputfile() in file-defs.php
Constructor
Class outputfile
outputfile in file-defs.php
The outputfile class manages files for outputting content. This includes both appending to an existing file, and creating new files. The method used in both cases is to write to a temporary file, and then rename/move it onto the final file path when closefile() is called.
p
top
Variable $pid
lockfile::$pid in lockfile-defs.php
Process ID of process lockfile is for
q
top
Method quickfile
quickfile::quickfile() in file-defs.php
Creates a file containing given content quickly.
Class quickfile
quickfile in file-defs.php
This is a derived class from outputfile and is a quick way of creating a file with content in a single hit. You can check the $created property afterwards to determine success/failure.
r
top
Method readall
inputfile::readall() in file-defs.php
Reads all of the file contents into class variable $content.
Method readln
csv_inputfile::readln() in file-defs.php
Reads the next line of the file in the form of an array of fields as delimited by the given charater. Lines can be of a length up to the specified maximum no. of chars.
Method readln
inputfile::readln() in file-defs.php
Reads the next line of the file, up to max chars specified.
Method remove
lockfile::remove() in lockfile-defs.php
Remove the lockfile. Can't do this if the lock is frozen, which is deemed to require manual intervention.
Method replace
outputfile::replace() in file-defs.php
Replace a pattern in the current $this->content with replacement string. This allows us to work on a template, replacing bits of it that represent our dynamic content.
s
top
Variable $savehow
outputfile::$savehow in file-defs.php
How to save: default "overwrite", or "append" to append.
Constant SAVE_FILE
SAVE_FILE in file-defs.php
Save the file on close
Method set_allowed_types
Set the allowed list of filetypes. This is specified as a comma-delimited list, and replaces any already defined.
Method set_maxsize
fileupload::set_maxsize() in file-defs.php
Set the maximum filesize allowed
Method set_timelimits
lockfile::set_timelimits() in lockfile-defs.php
Set the time limits. Some commonsense has to be applied here. You
Method store
fileupload::store() in file-defs.php
Store the current upload file. Optionally specify a destination dir, and a filename. This is useful if you want to process each file separately, and need to store the uploaded file in a particular place.
Method storeall
fileupload::storeall() in file-defs.php
Store all files away at destination dir. We use the original names by default.
Method style
stylesheet::style() in file-defs.php
Return a style setting(s) for given class name in the list format: "attrib:def;attrib:def; ..." Also allow specification of a particular attribute within the class to return the style setting for.
Class stylesheet
stylesheet in file-defs.php
Open a file which contains a stylesheet and read in the style settings. This is a special case of inputfile.
Method stylesheet
stylesheet::stylesheet() in file-defs.php
Constructor Open the given stylesheet file for input.
t
top
Variable $tempfname
outputfile::$tempfname in file-defs.php
Full pathname of destination (temporary) file
Variable $template_contents
Content of template file when read in
Variable $template_fname
Full pathname of template file
Variable $template_fp
outputfile::$template_fp in file-defs.php
File pointer
Method template
outputfile::template() in file-defs.php
This defines a template for the file content and flags the file as being of "templated" type. The template is expected to be at the $path specified. The template is opened and the entire file contents are put into $this->content.
Method type
outputfile::type() in file-defs.php
Set the file type. Possible types include 'text' (default), 'html', and 'templated'.
u
top
Variable $uploaded
fileupload::$uploaded in file-defs.php
Array of info on uploaded files
Variable $uploaded_count
No. of files uploaded
Function unique_filename
unique_filename() in file-defs.php
Return a random unique filename, with optional prefix and an optional extension. The filename is composed from an md5 of microtime(), plus the prefix and extension if given.
Constant UPLOAD_E_ACCESS
UPLOAD_E_ACCESS in file-defs.php
Destination directory access problem
Constant UPLOAD_E_BADTYP
UPLOAD_E_BADTYP in file-defs.php
Uploaded file was not of an allowed mime type
Constant UPLOAD_E_HACK
UPLOAD_E_HACK in file-defs.php
Attempt to move a non-uploaded file. Hacking.
Constant UPLOAD_E_MAXSIZ
UPLOAD_E_MAXSIZ in file-defs.php
Uploaded file exceeded the given maximum size
Constant UPLOAD_E_MOV
UPLOAD_E_MOV in file-defs.php
Failed to move file, filesys error (perms?)
Constant UPLOAD_E_OK
UPLOAD_E_OK in file-defs.php
Error code: All ok, no errors
w
top
Method write
outputfile::write() in file-defs.php
Write to file Write the given string to the output file.
Method writeln
outputfile::writeln() in file-defs.php
Write line to file Write the given string to the output file as a line.
a c d e f g h i k l m n o p q r s t u w