[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
testing for a remote file to include file on a Windows mapped drive
From: |
Drew Adams |
Subject: |
testing for a remote file to include file on a Windows mapped drive |
Date: |
Fri, 25 Jan 2008 10:47:51 -0800 |
I have some code that needs to avoid some particular processing when the
current input might name a remote file. I don't want the code to try to
contact anything remote in this case.
In Windows, you can map a remote directory to a virtual drive. So, for
instance, "h:foo" or "h:/foo" might represent a remote file. But the same
name would represent a local file if drive `h' is local, not mapped.
How can I test in Emacs, for Windows, whether a drive is local or mapped, in
order to determine whether "h:foo" might be local or remote?
AFAICT, the various ways Emacs uses to test file-name syntax to determine
remoteness do not take Windows drive mapping into account. I don't know if
that's a problem for Emacs in general (why wouldn't it be?), but it is a
problem for my use case.
I've looked at these. None does what I need.
. file-remote-p
. ffap-file-remote-p
. dired-sort-menu-remote-p
"\\`/\\([^@:/address@hidden)?\\([^:/]+\\):"
. ange-ftp-name-format
"\\`/\\(\\([^/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)"
. remote (ange-ftp) filenames (see make-auto-save-file-name)
"^/address@hidden:"
. ffap-ftp-regexp
"\\`/[^/:]+:"
Suggestions?
- testing for a remote file to include file on a Windows mapped drive,
Drew Adams <=
- RE: testing for a remote file to include file on a Windows mapped drive, Drew Adams, 2008/01/25
- RE: testing for a remote file to include file on a Windows mappeddrive, Drew Adams, 2008/01/25
- Re: testing for a remote file to include file on a Windows mappeddrive, Jason Rumney, 2008/01/25
- RE: testing for a remote file to include file on a Windows mappeddrive, Drew Adams, 2008/01/25
- Re: testing for a remote file to include file on a Windows mappeddrive, Stefan Monnier, 2008/01/25
- RE: testing for a remote file to include file on a Windows mappeddrive, Drew Adams, 2008/01/26
- Re: testing for a remote file to include file on a Windows mappeddrive, Eli Zaretskii, 2008/01/26
- Re: testing for a remote file to include file on a Windows mappeddrive, Michael Albinus, 2008/01/26
- Re: testing for a remote file to include file on a Windows mappeddrive, Jason Rumney, 2008/01/26
- RE: testing for a remote file to include file on a Windows mappeddrive, Drew Adams, 2008/01/26