Files
codeql/python/ql/examples/snippets/filename.ql
Rasmus Wriedt Larsen 74167923bc Python: Fix filename example
I got my eyes on this one since it was using a deprecated method, BUT it was
also doing the thing, since File.getName() is the same as
File.getAbsolutePath(), and that doesn't match the description :\
2020-05-25 13:17:32 +02:00

13 lines
197 B
Plaintext

/**
* @id py/examples/filename
* @name File with given name
* @description Finds files called `spam.py`
* @tags file
*/
import python
from File f
where f.getShortName() = "spam.py"
select f