Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions core/common/src/files/Paths.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ public fun Path(base: Path, vararg parts: String): Path {
/**
* Returns [RawSource] for the given file or throws if path is not a file or does not exist
*
* Use of this method is deprecated with warning since kotlinx-io 0.3.0. The method will be removed in 0.7.0.
* Use of this method is deprecated with warning since kotlinx-io 0.3.0, with error since 0.8.0,
* and it will be removed in the future.
*/
@Deprecated(
message = "Use FileSystem.source instead",
replaceWith = ReplaceWith(
expression = "SystemFileSystem.source(this).buffered()",
imports = arrayOf("kotlinx.io.files.FileSystem")
),
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@JvmName("sourceDeprecated")
public fun Path.source(): Source = SystemFileSystem.source(this).buffered()
Expand All @@ -117,15 +118,16 @@ public fun Path.source(): Source = SystemFileSystem.source(this).buffered()
* Returns [RawSink] for the given path, creates file if it doesn't exist, throws if it's a directory,
* overwrites contents.
*
* Use of this method is deprecated with warning since kotlinx-io 0.3.0. The method will be removed in 0.7.0.
* Use of this method is deprecated with warning since kotlinx-io 0.3.0, with error since 0.8.0,
* and it will be removed in the future.
*/
@Deprecated(
message = "Use FileSystem.sink instead",
replaceWith = ReplaceWith(
expression = "SystemFileSystem.sink(this).buffered()",
imports = arrayOf("kotlinx.io.files.FileSystem")
),
level = DeprecationLevel.WARNING
level = DeprecationLevel.ERROR
)
@JvmName("sinkDeprecated")
public fun Path.sink(): Sink = SystemFileSystem.sink(this).buffered()
Expand Down