[eel] Add separator to fs.

While NIO has one, it represents local (the one used by `Path`)
separator.

This one represents separator on Eel

GitOrigin-RevId: aadfc084314e353000be25c477fefa797ca564e9
This commit is contained in:
Ilya.Kazakevich
2025-11-06 01:06:37 +00:00
committed by intellij-monorepo-bot
parent 8bfc0ee8f6
commit eb4f2d1996
@@ -12,10 +12,16 @@ import java.nio.ByteBuffer
@get:ApiStatus.Internal
val EelFileSystemApi.pathSeparator: String
get() = when (this) {
is EelFileSystemPosixApi -> ":"
is EelFileSystemWindowsApi -> ";"
else -> throw UnsupportedOperationException("Unsupported OS: ${this::class.java}")
get() = when (descriptor.osFamily) {
EelOsFamily.Posix -> ":"
EelOsFamily.Windows -> ";"
}
@get:ApiStatus.Internal
val EelFileSystemApi.separator: Char
get() = when (descriptor.osFamily) {
EelOsFamily.Posix -> '/'
EelOsFamily.Windows -> '\\'
}
@ApiStatus.Internal
@@ -1180,4 +1186,4 @@ suspend fun EelFileSystemApi.copy(
suspend fun EelFileSystemApi.createTemporaryDirectory(setup: (EelFileSystemApi.CreateTemporaryEntryOptions.Builder).() -> Unit): EelResult<EelPath, EelFileSystemApi.CreateTemporaryEntryError> {
val options = EelFileSystemApi.CreateTemporaryEntryOptions.Builder().apply(setup).build()
return createTemporaryDirectory(options)
}
}