ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <>
Subject RE: How do I specify multiple Windows directories in one <propert y name> statement?
Date Mon, 06 May 2002 19:29:35 GMT

> From: Diane Holt []

I never meant for this to drag out for so long, but let me try
one more increment.  Maybe we can identity where our understandings
of the meaning of "relative" diverge.  (It might be in Windows vs.
in Ant.)

Isn't whether a pathname is relative defined by whether its meaning
depends on something else (whether it is evaluated relative to
something else)?

If a pathname always designates the same file regardless of your 
current directory setting, it's absolute, right?  If it depends 
on the current directory setting, even if only on the drive-letter 
portion of the current directory setting, it's not absolute, right?.  
If a pathname is not absolute, then it's relative, right? 

For example, the Windows pathname "\x" does not always designate the 
same file.  It designates "C:\x" if the drive portion of the current 
directory setting is the "C:" drive, and it designates "D:\x" if the 
drive portion is "D:".  Therefore, "\x" is not an absolute pathname,
right?  Therefore, it is a relative pathname, right?

(Note that "relative" doesn't necessarily mean that it designates a
file name below the _directory_ in the current directory setting, just 
that it's relative to some part of the current directory setting.  
Effectively, it's below the _root_ directory on the default drive.)

Recall how URLs work:  "xyz" and "/xyz" are both relative URL 
references.  The first is relative to the "directory" portion of the
base URL's pathname ("http://host/dir/x.html" + "xyz" -> 
"http://host/dir/xyz").  The second is not relative to that "directory" 
portion, but is still relative to the scheme and authority portions of 
the base URL ("http://host/dir/x.html" + "/xyz" -> "http://host/xyz".)

If we haven't diverged yet, then:

- Do Windows (or Java?) API functions resolve pathnames differently 
  than the behavior that I've seen in the DOS shell?

  E.g., if there's a function to resolve a pathname against a reference
  pathname (like Java's, does it resolve
  things differently that I described above?

- Does Ant treat Windows pathnames differently that Windows does?

  E.g., does Ant define "\xyz" as not being relative even though its
  meaning is relative to the current-drive portion of the current
  directory setting?

  Or does Ant not resolve Windows pathnames the same way Windows does?
  E.g., in a fileset, given a directory of "D:/", would a file pattern
  specification of "/x" not match "D:/x"?

Thanks for bearing with this.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message