All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mingwMain.File.kt Maven / Gradle / Ivy

There is a newer version: 0.4.1
Show newest version
package dev.petuska.klip.core.ext

import platform.posix.mkdir

/**
 * Native file separator for the platform (thanks a bunch, windows...)
 */
public actual val File.separator: String get() = "\\"

/**
 * Native newline separator for the platform (thanks a bunch, windows...)
 */
public actual val File.newline: String get() = "\r\n"

internal actual fun mppMkdir(path: String, permissions: Int): Int = mkdir(path)

/**
 * Checks if file path is starting from root (thanks a bunch, windows...)
 */
internal actual val File.isRooted: Boolean get() = getPath().matches("^[A-z]:\\$separator".toRegex())




© 2015 - 2025 Weber Informatics LLC | Privacy Policy