summaryrefslogtreecommitdiffstats
path: root/dirs.txi
blob: 65d8b24c0600fb0891cea726d9ecdaa963b09fa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@code{(require 'directory)}
@ftindex directory


@defun current-directory

@code{current-directory} returns a string containing the absolute file
name representing the current working directory.  If this string
cannot be obtained, #f is returned.

If @code{current-directory} cannot be supported by the platform, then #f is returned.
@end defun

@defun make-directory name

Creates a sub-directory @var{name} of the current-directory.  If
successful, @code{make-directory} returns #t; otherwise #f.
@end defun

@defun directory-for-each proc directory

@var{proc} must be a procedure taking one argument.
@samp{Directory-For-Each} applies @var{proc} to the (string) name of
each file in @var{directory}.  The dynamic order in which @var{proc} is
applied to the filenames is unspecified.  The value returned by
@samp{directory-for-each} is unspecified.


@defunx directory-for-each proc directory pred
Applies @var{proc} only to those filenames for which the procedure
@var{pred} returns a non-false value.


@defunx directory-for-each proc directory match
Applies @var{proc} only to those filenames for which
@code{(filename:match?? @var{match})} would return a non-false value
(@pxref{Filenames, , , slib, SLIB}).

@example
(require 'directory)
(directory-for-each print "." "[A-Z]*.scm")
@print{}
"Bev2slib.scm"
"Template.scm"
@end example
@end defun