You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/09/14 23:48:20 UTC
[incubator-nlpcraft] branch NLPCRAFT-384 updated: Update
NCUtils.scala
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-384
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-384 by this push:
new 050ae4f Update NCUtils.scala
050ae4f is described below
commit 050ae4f9efc4ca5aef72ba55feeecc543878d87d
Author: Nikita Ivanov <ni...@kernal.local>
AuthorDate: Tue Sep 14 16:48:13 2021 -0700
Update NCUtils.scala
---
.../main/scala/org/apache/nlpcraft/common/util/NCUtils.scala | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
index d2c2b03..4f3a701 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/util/NCUtils.scala
@@ -869,13 +869,6 @@ object NCUtils extends LazyLogging {
}
/**
- * Gets resource existing flag.
- *
- * @param res Resource.
- */
- def hasResource(res: String): Boolean = getClass.getClassLoader.getResourceAsStream(res) != null
-
- /**
* Serializes data.
*
* @param obj Data.
@@ -2329,6 +2322,11 @@ object NCUtils extends LazyLogging {
}
}
+ /**
+ *
+ * @param path
+ * @return
+ */
def isFile(path: String): Boolean = {
val f = new File(path)