Why ressource separator is "." instead of "/" ?

Answered

I'm using a java maven project and I have some issue when I create a resource directory...

When we create a directory, the "/" character is used to separate directory (which is the normal behavior). However, the "." character is used as a display separator.. This can produce for me ambiguity:

In fact, create a directory called "myBase.extension/subDirectory" and an other called "myBase/extension/subDirectory". This will create an directory "myBase.extension" which contains an other directory "subDirectory and an other directory "myBase" which contains "extension" which contain "subDirectory".

These directories are different, but look similar in the interface with the name "myBase.extension.subDirectory".. "

 

So my question, why use "." display separator when you use "/" separator to build it?

1
5 comments

Hi. Are you referring to a Java package naming rules? 

https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html

0
Avatar
Permanently deleted user

No, absolutely not. Use "." as package separator is of course the good choice.

I'm talking about the naming rules for the resources part. For a common maven project, the path is "src/main/resources".

 

0

Could you please provide a screenshot?

0
Avatar
Permanently deleted user

Of course.

In addition, the "ls -R" command from the directory resources:

.:
db  db.migration

./db:
migration

./db/migration:

./db.migration:

0

Please sign in to leave a comment.