TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

TensorFlow 1 version

Defined in generated file: python/ops/

Returns the set of files matching one or more glob patterns.


Note that this routine only supports wildcard characters in the basename portion of the pattern, not in the directory portion. Note also that the order of filenames returned is deterministic.


  • pattern: A Tensor of type string. Shell wildcard pattern(s). Scalar or vector of type string.
  • name: A name for the operation (optional).


A Tensor of type string.