File tree 1 file changed +2
-2
lines changed
src/main/scala/com/johnsnowlabs/nlp/util/io
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ object ResourceHelper {
106
106
case class SourceStream (resource : String ) {
107
107
108
108
var fileSystem : Option [FileSystem ] = None
109
- private val (pathExists, path) = OutputHelper .doesPathExists(resource)
109
+ private val (pathExists : Boolean , path : Option [ Path ] ) = OutputHelper .doesPathExists(resource)
110
110
if (! pathExists) {
111
111
throw new FileNotFoundException (s " file or folder: $resource not found " )
112
112
} else {
@@ -156,7 +156,7 @@ object ResourceHelper {
156
156
Paths .get(destination.toString, path.get.getName).toUri
157
157
else destination.toUri
158
158
case " dbfs" =>
159
- val dbfsPath = path.toString.replace(" dbfs:/" , " /dbfs/" )
159
+ val dbfsPath = path.get. toString.replace(" dbfs:/" , " /dbfs/" )
160
160
val sourceFile = new File (dbfsPath)
161
161
val targetFile = new File (destination.toString)
162
162
if (sourceFile.isFile) FileUtils .copyFileToDirectory(sourceFile, targetFile)
You can’t perform that action at this time.
0 commit comments