(< 0 (file-attribute-size
(file-attributes (file-chase-links file)))))))"
:group 'files
+ :group 'tramp
:version "24.1"
:type '(choice
- (const :tag "Do not inhibit file name cache" nil)
- (const :tag "Do not use file name cache" t)
- (integer :tag "Do not use file name cache"
- :format "Do not use file name cache older then %v seconds"
+ (const :tag "Do not cache remote file attributes" t)
+ (const :tag "Cache remote file attributes" nil)
+ (integer :tag "Cache remote file attributes with expiration"
+ :format "Cache expiry in seconds: %v"
:value 10)))
+(defcustom remote-file-name-access-timeout nil
+ "Timeout (in seconds) for `access-file'.
+This timeout limits the time to check, whether a remote file is
+accessible. `access-file' returns an error after that time. If
+the value is 0 or nil, no timeout is used.
+
+This applies only when there isn't time spent for other actions,
+like reading passwords."
+ :group 'files
+ :group 'tramp
+ :version "30.1"
+ ;;:type '(choice :tag "Timeout (seconds)" natnum (const nil)))
+ :type '(choice
+ (natnum :tag "Timeout (seconds)")
+ (const :tag "Do not use timeout" nil)))
+
(defun file-local-name (file)
"Return the local name component of FILE.
This function removes from FILE the specification of the remote host