简体   繁体   中英

What is the meaning of ./../ Path in java?

在属性文件中,有人定义了path =./../someName/somename1./../什么意思./../

"./" Represents current directory.

"../" means one level up in the hierarchy defined by the path.

./ the current folder the working file is in

../ one directory level higher

so ./../ means one level higher than the folder the current working file is in.

A path always contains the core component and the complete address list required to locate the file. It is mainly significant environment variable of Java environment. In other words it represents a path that is hierarchical sequence of directory and file name elements separated by a special partition. A Path can represent a root, a root and a sequence of names .A path is considered to be an empty path if it consists solely of one name element that is empty. For more details you can move to resume writing service Indianapolis from online.

Current directory plus one level up/back/higher.

Let's say that your current directory is /whatever/my/stuff, then this will put you at /whatever/my/ instead of /whatever/my/stuff/

../ points to the file's parent directory and ./ to the current directory the file is in.

in your example home/youAreHere/ turns into home/someName/ which contains someName1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM