summaryrefslogtreecommitdiffstats
path: root/plug-ins/script-fu/ftx/ftx-functions.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:13:10 +0000
commit3c57dd931145d43f2b0aef96c4d178135956bf91 (patch)
tree3de698981e9f0cc2c4f9569b19a5f3595e741f6b /plug-ins/script-fu/ftx/ftx-functions.txt
parentInitial commit. (diff)
downloadgimp-3c57dd931145d43f2b0aef96c4d178135956bf91.tar.xz
gimp-3c57dd931145d43f2b0aef96c4d178135956bf91.zip
Adding upstream version 2.10.36.upstream/2.10.36
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plug-ins/script-fu/ftx/ftx-functions.txt')
-rw-r--r--plug-ins/script-fu/ftx/ftx-functions.txt119
1 files changed, 119 insertions, 0 deletions
diff --git a/plug-ins/script-fu/ftx/ftx-functions.txt b/plug-ins/script-fu/ftx/ftx-functions.txt
new file mode 100644
index 0000000..5365bc5
--- /dev/null
+++ b/plug-ins/script-fu/ftx/ftx-functions.txt
@@ -0,0 +1,119 @@
+File and Time Extensions for TinyScheme (FTX) 1.0 [August, 2004]
+
+Based on the TinyScheme Extensions (TSX) 1.1 [September, 2002]
+(c) 2002 Manuel Heras-Gilsanz (manuel@heras-gilsanz.com)
+
+This software is subject to the license terms contained in the
+LICENSE file.
+
+
+TSX FUNCTIONS
+
+TSX incorporates the following functions:
+
+*File system (included if HAVE_FILESYSTEM is defined in tsx.h)
+
+Scheme already defines functions to read and write files. These
+functions allow access to the filesystem to check if a certain
+file exists, to get its size, etc.
+
+In addition to these functions, a string constant DIR-SEPARATOR
+has been defined. It should be used in scripts which build file
+names that include one or more directories to keep the scripts
+portable to different operating systems.
+
+(file-exists? filename)
+ filename: string
+
+ This function returns #t if the indicated file exists, and
+ #f if it does not exist or if it is not accessible to the
+ requesting user. Accessibility is based on the real user
+ and group ID rather than the effective user ID and group ID.
+
+(file-type filename)
+ filename: string
+
+ This function returns a value based on the file type. It
+ returns FILE_TYPE_FILE (1) for regular files, FILE_TYPE_DIR
+ (2) for directories, and FILE_TYPE_LINK (3) for symbolic
+ links. The value FILE_TYPE_OTHER (0) is returned if the file
+ is of some other type, does not exist, or if the user does
+ not have sufficient privileges to allow the file type to be
+ determined.
+
+(file-size filename)
+ filename: string
+
+ This function returns the size (in bytes) of the
+ indicated file, or #f if the file does not exists or
+ is not accessible to the requesting user.
+
+(file-delete filename)
+ filename: string
+
+ Removes the specified file. It returns #t if the operation
+ succeeds, or #f otherwise (e.g., because the file is
+ read-only, or because the file does not exist).
+
+(dir-open-stream path)
+ path: string
+
+ Opens a "directory stream" on the provided directory path.
+ This stream will provide all the files within the directory,
+ using the function read-dir-entry. The stream should be closed
+ at the end with dir-close-stream.
+
+(dir-read-entry dirstream)
+ dirstream: directory stream, obtained with dir-open-stream.
+
+ It returns the name of the following directory entry, or eof
+ if all the entries were provided. Check the return value with
+ with eof-object?.
+
+(dir-rewind dirstream)
+ dirstream: directory stream, obtained with dir-open-stream.
+
+ Resets the given directory stream. The next call to dir-read-entry
+ will return the first entry again. It returns #t if the operation
+ succeeds, or #f otherwise (ie. dirstream not valid)..
+
+(dir-close-stream dirstream)
+ dirstream: directory stream, obtained with dir-open-stream.
+
+ Close directory stream. No further calls to read-dir-entry should
+ be performed.
+
+(dir-make dirname . mode)
+ dirname: string
+ mode: integer representing permissions
+
+ Create the directory specified, setting the directory permissions based
+ upon the optional mode argument (taking into account the current
+ umask). If no mode is specified then use the default (umask)
+ permissions. Returns #t if the operation succeeds, otherwise #f.
+ Possible reasons for failure are that the directory already exists,
+ the user is not authorized to create it, or the mode is incorrectly
+ specified).
+
+*Time (available if HAVE_TIME is defined in tsx.h)
+
+(time)
+ Returns the current local time, as a list of integer
+ containing:
+ (year month day-of-month hour min sec millisec)
+ The year is expressed as an offset from 1900.
+
+(gettimeofday)
+ Returns a list containing the number of seconds from
+ the beginning of the day, and microseconds within the
+ current second.
+
+(usleep microsec)
+ microsec: integer
+
+ Suspends execution of the calling thread during the
+ specified number of microseconds.
+
+
+END
+