Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIRAC.GetFile with wildcard #1793

Closed
fstagni opened this issue Jan 29, 2014 · 6 comments
Closed

DIRAC.GetFile with wildcard #1793

fstagni opened this issue Jan 29, 2014 · 6 comments

Comments

@fstagni
Copy link
Contributor

fstagni commented Jan 29, 2014

(from Alexander Richards)

Exposed in the API is the 'getFile' method of API.Dirac. This it seams does work for a list of files but not for a wildcard. I note also that you have a method 'getFilesFromDirectory' in DataManagementSystem/Client/ReplicaManager.py.. This it seems is capable of accepting a wildcard. Would it be possible to have this exposed in the API or the getFile method to include wildcards?

@ghost ghost assigned fstagni and chaen Jan 29, 2014
@atsareg
Copy link
Contributor

atsareg commented Mar 5, 2014

getFilesFromDirectory() attempts to load all the files from the directory and recursively from subdirectories. I guess this is not the desired behaviour. One wants to have:

Dirac.getFile('/lhcb/user/p/pupkin/*')

to get all the files in the directory /lhcb/user/p/pupkin but not its subdirectories.
What about more precise wild cards, like:

Dirac.getFile('/lhcb/user/p/pupkin/*.root')

is it desired or not ?

@atsareg atsareg added DMS and removed DMS labels Mar 5, 2014
@atsareg atsareg assigned atsareg and unassigned chaen Mar 5, 2014
@fstagni
Copy link
Contributor Author

fstagni commented Mar 5, 2014

Yes, I believe your examples are the desired behaviour.

@alexanderrichards
Copy link
Contributor

yes ideally the full range of wildcard functionality would be desirable similar to fnmatch

e.g.
' * '
' *.root '
' file?.root '

etc:
http://docs.python.org/2/library/fnmatch.html

Cheers
Alex

@fstagni fstagni assigned ubeda and unassigned atsareg Apr 3, 2014
@fstagni fstagni closed this as completed Apr 3, 2014
@alexanderrichards
Copy link
Contributor

hi @fstagni has this been closed because it has now been implemented as we (ganga) are still after this feature.

Cheers
Alex

@fstagni
Copy link
Contributor Author

fstagni commented Apr 3, 2014

Oops closed by mistake.

@chaen
Copy link
Contributor

chaen commented Jan 25, 2016

Can be closed I believe, Andrei implemented it

@fstagni fstagni closed this as completed Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants