Filesystem functions
The CICS® TS Feature Pack for Dynamic Scripting V2.0
supports Filesystem functions.
All PHP functions are described in detail in the PHP manual at php.net.
The following Filesystem functions are supported:
basename
chgrp
chmod
chown
clearstatcache 1
copy
dirname
disk_free_space
diskfreespace
fclose
feof
fflush
fgetc
fgetcsv
fgets
file
file_exists
file_get_contents
file_put_contents
fileatime
filectime
filegroup
fileinode
filemtime
fileowner
fileperms
filesize
filetype
flock 2
fopen 3
fpassthru
fputcsv
fputs
fread
fseek
fstat
ftell
ftruncate
fwrite
glob
is_dir
is_executable
is_file
is_link
is_readable
is_uploaded_file
is_writable
is_writeable
link
linkinfo
lstat
mkdir
move_uploaded_file
parse_ini_file
pathinfo
pclose
popen
readfile
readlink
realpath 4
rename
rewind
rmdir
stat
symlink
tempnam
touch
umask
unlink
Notes relating to specific Filesystem functions:
- 1 There is no statcache and so this function is a no operation.
- 2 It is not possible to obtain an exclusive lock on a file that is opened for read-only mode by using flock(, LOCK_EX), unless you also have write permission to it. You do not need to open the file in write mode, but you must have permission to do so. A warning is generated if you do not have write permission, and false is returned indicating no lock is obtained.
- 3 The php.net runtime outputs "No such file or directory" when an invalid mode is used within fopen. The runtime for PHP in CICS TS Feature Pack for Dynamic Scripting V2.0 issues a message to warn of an invalid mode.
- 4 realpath() function does not detect changes to file names that were previously symbolic links because of the canonical file name cache in Java™. To replicate the behavior in PHP the JVM can be started with -Dsun.io.useCanonCaches=false
Notes relating to all Filesystem functions:
- The use of safe mode is not supported.
- The use of magic quotes is not supported.
- Process streams that are opened with popen do not write to stdout (w) or stderr (r/w). For example, popen('dummy', 'r'); would write to stderr on the php.net runtime: "'dummy' is not recognized as an internal or external command, operable program, or batch file.". The runtime for PHP in CICS TS Feature Pack for Dynamic Scripting V2.0 does not output this string.
- Umask is never reset at the end of a request.
- Local file streams, http://, and input:// are supported.