ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

Join one or more path components intelligently.

TensorFlow specific filesystems will be joined like a url (using "/" as the path seperator) on all platforms:

On Windows or Linux/Unix-like:

>>>"gcs://folder", "")
'gcs://folder/'"ram://folder", "")

But the native filesystem is handled just like os.path.join:

path ="folder", "")
if == "nt":
  expected = "folder\\"  # Windows
  expected = "folder/"  # Linux/Unix-like
path == expected

path string, path to a directory
paths string, additional paths to concatenate

path the joined path.