Script Folder


File system functions come in two forms. Older functions were written as two distinct functions names, only the prefix changed; Where fexists() operates on files in the secure data directory (often named mivadata) and sexists() operates on the web site directory (often called html or httpdocs).

These functions are grouped under Data Folder and Script Folder respectively.

Newer file systems functions contain an additional "location" parameter where location is either 'data' or 'script'. For example file_read( path, location, input_data var ). These functions are grouped together under Either Folder.

Name -- Syntax / Description
schmod
schmod( path, mode )
Changes a files or directory permissions.
Returns 1 if sucessful, 0 if fails
  • path = fully qualified path to the file
  • mode_number = ( nnnn decimal number) or '0nnnn' (octal string)
scopy
scopy( source, destination )
Copies a file in the scripts directory.
Returns 1 if sucessful, 0 if fails
  • source = source file fully qualified path
  • destination = destination file fully qualified path
sdelete
sdelete( path )
Deletes a file in the scripts directory. See See fdelete()
Returns 1 if sucessful, 0 if fails
  • path = fully qualified path of the file to delete
sexists
sexists( path )
Tests if the file named in path exists in the scripts directory.
Returns 1 if the file exsists else 0.
  • path = the fully qualified path to the file.
sfcopy
sfcopy( source, destination )
Copies a file from the scripts directory to the data directory.
Returns 1 if sucessful, 0 if fails
  • scripts_source = source file fully qualified path in the scripts folder
  • data_destination = destination file fully qualified path in the data folder
sfrename
sfrename( source, destination )
Rename source file to destination file. Can rename or move a file in the scripts directory.
Returns 1 if sucessful, 0 if fails
  • source = source file fully qualified path
  • destination = destination file fully qualified path
sfsymlink
sfsymlink( source, destination )
This function creates a symbolic from a file in the scripts directory to the data directory (Available on UNIX file systems only)
Returns 1 if sucessful, 0 if fails
  • source - source file fully qualified path in the scripts directory
  • destination = destination file fully qualified path in the data directory
sisdir
sisdir( path )
Tests if the file named in path is a directory.
Returns 1 if the path is a directory else 0.
  • path = the fully qualified path to the directory
smkdir
smkdir( path )
Creates a directory specified by path in the scripts directory.
Returns 1 if sucessful, 0 if fails
  • path = the fully qualified path to the directory
smode
smode( path )
Returns the permissions mode of path in the scripts directory.
Returns the permissions mode or -1 if the file does not exist
  • path = the fully qualified path to the file or directory
srename
srename( source, destination )
Rename source file to destination file. Can rename or move a file in the scripts directory.
Returns 1 if sucessful, 0 if fails
  • source = source file fully qualified path
  • destination = destination file fully qualified path
ssize
ssize( path )
Get the size of a file in the scripts directory
Returns the file size in bytes or -1 if the file does not exist.
  • path = the fully qualified path to the file
ssymlink
ssymlink( source, destination )
(Unix only) Creates a symbolic link to the file in the scripts directory.
Returns 1 if sucessful, 0 if fails
  • source = source file fully qualified path
  • destination = destination file fully qualified path
stime
stime( path )
Gets the last modified time for the file in scripts directory.
Returns time_t since a file in the was last modified or -1 if the file does not exist.
  • path = the fully qualified path to the file
User Annotations: filesystem-script