-
Notifications
You must be signed in to change notification settings - Fork 275
feat: refactor config and files storing (APP-154) #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
astansler
commented
Nov 23, 2017
- JAR directory changed
- Configs and data files (e.g. longevity incremental update data, models) storing in the same directory where JAR located
| return getPath(name, *parts).toFile() | ||
| } | ||
|
|
||
| fun isNotExists(name:String, vararg parts: String): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer notExists, same as Files.notExists and a bit better english
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| import java.nio.file.Paths | ||
| import java.nio.file.Path | ||
|
|
||
| object FileHelper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a small comment please that this class is a wrapper around java Paths and Files classes to work the sourcerer's files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| val fullPath = Paths.get(fullPathString) | ||
| val root = fullPath.root | ||
| // Removing jar filename. | ||
| return root.resolve(fullPath.subpath(0, fullPath.nameCount - 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be unexpected behavior for the user, if the user moved a jar file, and we put all our stuff next to it, @sergey-surkov is it ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would the user want to do it? We use bash script that points to a specific location of the JAR to run sourcerer, all will be broken anyway.