Absolute path relative path under windows and linux

relative path

Windows and linux are written in the same way, and both represent that the current directory is used as the basis to find the destination directory, which is a bit convenient and quick

. Current directory
... Parent directory

#示例:
"../csv-union/"+File+'/'+file"

Absolute path

The actual root directory is used as the path from the starting reference to the destination directory, which is somewhat unaffected by the movement of running files

windows

# 示例:
"G:\\论文\\论文\\ast\\function_representation_learning-master\\"

Linux

# 示例:
'/home/jdk1.8.0_65/bin/java'

Guess you like

Origin blog.csdn.net/lockhou/article/details/113904591