diff --git a/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt b/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt index 347c686..419f453 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/utility/FileAccess.kt @@ -21,10 +21,10 @@ package de.staropensource.engine.base.utility import de.staropensource.engine.base.Engine.Companion.logger import de.staropensource.engine.base.annotation.NonKotlinContact +import de.staropensource.engine.base.exception.VerificationFailedException import de.staropensource.engine.base.exception.io.FileOrDirectoryNotFoundException import de.staropensource.engine.base.exception.io.FileTooLargeException import de.staropensource.engine.base.exception.io.IOAccessException -import de.staropensource.engine.base.exception.VerificationFailedException import de.staropensource.engine.base.implementable.stream.Stream import de.staropensource.engine.base.implementation.stream.FileAccessStream import de.staropensource.engine.base.utility.Environment.OperatingSystem.* @@ -304,15 +304,6 @@ class FileAccess { @JvmName(name = "getJavaFile") get - /** - * Contains the [FileAccessStream] for this instance. - * - * @since v1-alpha10 - */ - private var stream: FileAccessStream? = null - @NonKotlinContact - @JvmName(name = "getActualStream") get - // -----> Constructors /** @@ -577,12 +568,7 @@ class FileAccess { * @return [FileAccessStream] instance * @since v1-alpha10 */ - fun toStream(): FileAccessStream { - if (stream == null) - stream = FileAccessStream(this) - - return stream!! - } + fun toStream(): FileAccessStream = FileAccessStream(this) // -----> File creation, moving, copying and deletion