@Throws(IOException::class) fun importContent(sessionId: String, sourcePath: String?): Uri? { val sourceFile = File(sourcePath) var targetPath: String? = "/" + sessionId + "/upload/" + sourceFile.getName() targetPath = createUniqueFilename(targetPath) copyToVfs(sourcePath, targetPath) return vfsUri(targetPath) }
Copy device content into vfs . All imported content is stored under /SESSION_NAME/ The original full path is retained to facilitate browsing The session content can be deleted when the session is over