Commit cb0cd911 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(file-ownership-preserved-p): New function.

parent 2d5e692e
......@@ -1429,6 +1429,13 @@ we do not remove backup version numbers, only true file version numbers."
(string-match "~\\'" name)
(length name))))))))
(defun file-ownership-preserved-p (file)
"Returns t if deleting FILE and rewriting it would preserve the owner."
(let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
(if handler
(funcall handler 'file-ownership-preserved-p file)
(= (nth 2 (file-attributes file)) (user-uid)))))
(defun file-name-sans-extension (filename)
"Return FILENAME sans final \"extension\".
The extension, in a file name, is the part that follows the last `.'."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment