Skip to content

Conversation

@astansler
Copy link
Member

  • JAR directory changed
  • Configs and data files (e.g. longevity incremental update data, models) storing in the same directory where JAR located

@astansler astansler self-assigned this Nov 23, 2017
@astansler astansler requested a review from asurkov November 23, 2017 23:12
return getPath(name, *parts).toFile()
}

fun isNotExists(name:String, vararg parts: String): Boolean {
Copy link
Contributor

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

Copy link
Member Author

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 {
Copy link
Contributor

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.

Copy link
Member Author

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))
Copy link
Contributor

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?

Copy link
Member Author

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.

@astansler astansler merged commit 69efe09 into develop Nov 26, 2017
@astansler astansler deleted the config-and-files branch November 26, 2017 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants