mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[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:
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user