I am trying to append File separator at the end of a given directory path. But `os.path.join` is not appending the required separator.

I have tried the below code. Consider directoryPath = //TEAM/PATH\_1/PATH\_2/2018-Aug-06

```
os.path.join(directoryPath, "")

```

But the output it gives is 

> 
> //TEAM/PATH\_1/PATH\_2/2018-Aug-06\
> 
> 
> 

So i tried the below code.

```
if(len(directoryPath.split("/")) >= 1):
  return os.path.join(directoryPath, "/")
else:
  return os.path.join(directoryPath, "\\")

```

For this output was 

> 
> //TEAM/PATH\_1/
> 
> 
> 

Can someone guide me the correct way to append File Separator at the end.