This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Files | |
import java.nio.file.Path | |
import java.nio.file.Paths | |
val path = Paths.get("foo") | |
Files.createSymbolicLink(path, path) | |
println("exists : ${path.toFile().exists()}") | |
println("isFile : ${path.toFile().isFile()}") | |
println("isDirectory : ${path.toFile().isDirectory()}") | |
println("createNewFile: ${path.toFile().createNewFile()}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
val file = File("/dev/null") | |
println("exists: ${file.exists()}") | |
println("isFile: ${file.isFile()}") | |
println("isDirectory: ${file.isDirectory()}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.droidsonroids.edgetest | |
import android.content.res.AssetFileDescriptor | |
import android.support.test.InstrumentationRegistry | |
import org.junit.Assert | |
import org.junit.Test | |
class TooManyOpenFilesTest { | |
//asset named "test" required | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader | |
import java.io.File | |
import java.io.FileReader | |
val file = File("test") | |
file.writeText("this is file content") | |
BufferedReader(FileReader(file)).use { | |
println("deleted?: ${file.delete()}") | |
println("content?: ${it.readLine()}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildTypes { | |
debug { | |
pseudoLocalesEnabled true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
defaultConfig { | |
//other locales will be filtered out | |
resConfigs 'en', 'hu' | |
} | |
buildTypes { | |
debug { | |
pseudoLocalesEnabled true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.applicationVariants.all { | |
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}") | |
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<string name="author" translatable="false">Droids On Roids</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="pl"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="pl"> | |
<plurals name="numberOfSongsAvailable"> | |
<item quantity="one">Znaleziono %d piosenkę.</item> | |
<item quantity="few">Znaleziono %d piosenki.</item> | |
<item quantity="many">Znaleziono %d piosenek.</item> | |
<item quantity="other">Liczba znalezionych piosenek: %d.</item> | |
</plurals> | |
</resources> |