2
* Copyright © 2007 Keith Packard
4
* Permission to use, copy, modify, distribute, and sell this software and its
5
* documentation for any purpose is hereby granted without fee, provided that
6
* the above copyright notice appear in all copies and that both that copyright
7
* notice and this permission notice appear in supporting documentation, and
8
* that the name of the copyright holders not be used in advertising or
9
* publicity pertaining to distribution of the software without specific,
10
* written prior permission. The copyright holders make no representations
11
* about the suitability of this software for any purpose. It is provided "as
12
* is" without express or implied warranty.
14
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24
@FUNC@ FcDirCacheUnlink
25
@TYPE1@ const FcChar8 * @ARG1@ dir
26
@TYPE2@ FcConfig * @ARG2@ config
27
@PURPOSE@ Remove all caches related to <parameter>dir</parameter>
29
Scans the cache directories in <parameter>config</parameter>, removing any
30
instances of the cache file for <parameter>dir</parameter>. Returns FcFalse
31
when some internal error occurs (out of memory, etc). Errors actually
32
unlinking any files are ignored.
36
@FUNC@ FcDirCacheValid
37
@TYPE1@ const FcChar8 * @ARG1@ dir
38
@PURPOSE@ check directory cache
40
Returns FcTrue if <parameter>dir</parameter> has an associated valid cache
41
file, else returns FcFalse
46
@TYPE1@ const FcChar8 * @ARG1@ dir
47
@TYPE2@ FcConfig * @ARG2@ config
48
@TYPE3@ FcChar8 ** @ARG3@ cache_file
49
@PURPOSE@ load a directory cache
51
Loads the cache related to <parameter>dir</parameter>. If no cache file
52
exists, returns NULL. The name of the cache file is returned in
53
<parameter>cache_file</parameter>, unless that is NULL. See also
59
@TYPE1@ const FcChar8 * @ARG1@ dir
60
@TYPE2@ FcBool% @ARG2@ force
61
@TYPE3@ FcConfig * @ARG3@ config
62
@PURPOSE@ read or construct a directory cache
64
This returns a cache for <parameter>dir</parameter>. If
65
<parameter>force</parameter> is FcFalse, then an existing, valid cache file
66
will be used. Otherwise, a new cache will be created by scanning the
67
directory and that returned.
71
@FUNC@ FcDirCacheLoadFile
72
@TYPE1@ const FcChar8 * @ARG1@ cache_file
73
@TYPE2@ struct stat * @ARG2@ file_stat
74
@PURPOSE@ load a cache file
76
This function loads a directory cache from
77
<parameter>cache_file</parameter>. If <parameter>file_stat</parameter> is
78
non-NULL, it will be filled with the results of stat(2) on the cache file.
82
@FUNC@ FcDirCacheUnload
83
@TYPE1@ FcCache * @ARG1@ cache
84
@PURPOSE@ unload a cache file
86
This function dereferences <parameter>cache</parameter>. When no other
87
references to it remain, all memory associated with the cache will be freed.