~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/ftx/ftx-functions.txt

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
File and Time Extensions for TinyScheme (FTX) 1.0  [August, 2004]
 
2
 
 
3
Based on the TinyScheme Extensions (TSX) 1.1  [September, 2002]
 
4
(c) 2002 Manuel Heras-Gilsanz (manuel@heras-gilsanz.com)
 
5
 
 
6
This software is subject to the license terms contained in the
 
7
LICENSE file.
 
8
 
 
9
 
 
10
TSX FUNCTIONS
 
11
 
 
12
TSX incorporates the following functions:
 
13
 
 
14
*File system (included if HAVE_FILESYSTEM is defined in tsx.h)
 
15
 
 
16
Scheme already defines functions to read and write files. These
 
17
functions allow access to the filesystem to check if a certain
 
18
file exists, to get its size, etc.
 
19
 
 
20
In addition to these functions, a string constant DIR-SEPARATOR
 
21
has been defined. It should be used in scripts which build file
 
22
names that include one or more directories to keep the scripts
 
23
portable to different operating systems.
 
24
 
 
25
(file-exists? filename)
 
26
        filename: string
 
27
 
 
28
        This function returns #t if the indicated file exists, and
 
29
        #f if it does not exist or if it is not accessible to the
 
30
        requesting user. Accessibility is based on the real user
 
31
        and group ID rather than the effective user ID and group ID.
 
32
 
 
33
(file-type filename)
 
34
        filename: string
 
35
 
 
36
        This function returns a value based on the file type. It
 
37
        returns FILE_TYPE_FILE (1) for regular files, FILE_TYPE_DIR
 
38
        (2) for directories, and FILE_TYPE_LINK (3) for symbolic
 
39
        links. The value FILE_TYPE_OTHER (0) is returned if the file
 
40
        is of some other type, does not exist, or if the user does
 
41
                not have sufficient priveleges to allow the file type to be
 
42
        determined.
 
43
 
 
44
(file-size filename)
 
45
        filename: string
 
46
 
 
47
        This function returns the size (in bytes) of the
 
48
        indicated file, or #f if the file does not exists or
 
49
        is not accessible to the requesting user.
 
50
 
 
51
(file-delete filename)
 
52
        filename: string
 
53
 
 
54
        Removes the specified file. It returns #t if the operation
 
55
        succeeds, or #f otherwise (e.g., because the file is
 
56
        read-only, or because the file does not exist).
 
57
 
 
58
(dir-open-stream path)
 
59
        path: string
 
60
 
 
61
        Opens a "directory stream" on the provided directory path.
 
62
        This stream will provide all the files within the directory,
 
63
        using the function read-dir-entry. The stream should be closed
 
64
        at the end with dir-close-stream.
 
65
 
 
66
(dir-read-entry dirstream)
 
67
        dirstream: directory stream, obtained with dir-open-stream.
 
68
 
 
69
        It returns the name of the following directory entry, or eof
 
70
        if all the entries were provided. Check the return value with
 
71
        with eof-object?.
 
72
 
 
73
(dir-rewind dirstream)
 
74
        dirstream: directory stream, obtained with dir-open-stream.
 
75
 
 
76
        Resets the given directory stream. The next call to dir-read-entry
 
77
        will return the first entry again. It returns #t if the operation
 
78
        succeeds, or #f otherwise (ie. dirstream not valid)..
 
79
 
 
80
(dir-close-stream dirstream) 
 
81
        dirstream: directory stream, obtained with dir-open-stream.
 
82
 
 
83
        Close directory stream. No further calls to read-dir-entry should
 
84
        be performed.
 
85
 
 
86
 
 
87
*Time (available if HAVE_TIME is defined in tsx.h)
 
88
 
 
89
(time)
 
90
        Returns the current local time, as a list of integer
 
91
        containing:
 
92
          (year month day-of-month hour min sec millisec)
 
93
        The year is expressed as an offsett from 1900.
 
94
 
 
95
(gettimeofday)
 
96
        Returns a list containing the number of seconds from
 
97
        the beginning of the day, and microseconds within the
 
98
        current second.
 
99
 
 
100
(usleep microsec)
 
101
        microsec: integer
 
102
 
 
103
        Suspends execution of the calling thread during the
 
104
        specified number of microseconds.
 
105
 
 
106
 
 
107
END
 
108