summaryrefslogtreecommitdiff
path: root/doc/lispref/files.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r--doc/lispref/files.texi34
1 files changed, 29 insertions, 5 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 3e1fba3acab..2739e3e509d 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -653,8 +653,9 @@ and also calls the functions in the list
@xref{Format Conversion}.
Normally, @code{write-region} displays the message @samp{Wrote
-@var{filename}} in the echo area. If @var{visit} is neither @code{t}
-nor @code{nil} nor a string, then this message is inhibited. This
+@var{filename}} in the echo area. This message is inhibited if
+@var{visit} is neither @code{t} nor @code{nil} nor a string, or if
+Emacs is operating in batch mode (@pxref{Batch Mode}). This
feature is useful for programs that use files for internal purposes,
files that the user does not need to know about.
@end deffn
@@ -716,15 +717,15 @@ some other job.
This function locks the file @var{filename}, if the current buffer is
modified. The argument @var{filename} defaults to the current buffer's
visited file. Nothing is done if the current buffer is not visiting a
-file, or is not modified, or if the system does not support locking.
+file, or is not modified, or if the option @code{create-lockfiles} is
+@code{nil}.
@end defun
@defun unlock-buffer
This function unlocks the file being visited in the current buffer,
if the buffer is modified. If the buffer is not modified, then
the file should not be locked, so this function does nothing. It also
-does nothing if the current buffer is not visiting a file, or if the
-system does not support locking.
+does nothing if the current buffer is not visiting a file, or is not locked.
@end defun
@defopt create-lockfiles
@@ -1697,6 +1698,16 @@ version of an existing file; saving a file preserves its existing
permissions.
@end defun
+@defmac with-file-modes mode body@dots{}
+This macro evaluates the @var{body} forms with the default
+permissions for new files temporarily set to @var{modes} (whose value
+is as for @code{set-file-modes} above). When finished, it restores
+the original default file permissions, and returns the value of the
+last form in @var{body}.
+
+This is useful for creating private files, for example.
+@end defmac
+
@defun default-file-modes
This function returns the default file permissions, as an integer.
@end defun
@@ -2014,6 +2025,11 @@ form.
@end example
@end defun
+@defun directory-name-p filename
+This function returns non-@code{nil} if @var{filename} ends with a
+forward slash (@samp{/}) character.
+@end defun
+
@node Directory Names
@subsection Directory Names
@cindex directory name
@@ -2601,6 +2617,14 @@ An error is signaled if @var{directory} is not the name of a directory
that can be read.
@end defun
+@defun directory-files-recursively directory match &optional include-directories
+Return all files under @var{directory} whose file names match
+@var{match} recursively. The file names are returned ``depth first'',
+meaning that contents of sub-directories are returned before contents
+of the directories. If @var{include-directories} is non-@code{nil},
+also return directory names that have matching names.
+@end defun
+
@defun directory-files-and-attributes directory &optional full-name match-regexp nosort id-format
This is similar to @code{directory-files} in deciding which files
to report on and how to report their names. However, instead