Open kmsquire opened 10 years ago
I think that this would be great if Glob.jl would support absolute path. Or is there any reason for not supporting this?
Not really—I just didn't have an idea at the time for representing them (and, for a variety of reasons, didn't consider it as an expected use case initially). It's also a case where Windows is more than a bit wonky, making this less innocent that it might at first appear. (long story short, currently a "glob" is explicitly not a file path, but is more nearly a URI wildcard pattern fragment which returns a set of file paths when acted upon.)
Hi!
First, thanks for this useful package :)
I think this is related to this issue. I think that the error message Glob pattern cannot be empty or start with a / character
for glob
could suggest trying using "/"
as the second argument instead (and deleting it from the first):
glob("/home/diego")
glob("home/diego", "/")
A docstring for the function could be useful in the meantime.
Best,
1 implements this for strings only, by stripping off the leading
/
before creating theGlobMatch
object. Ideally, support would be in theGlobMatch
object directly.