MCPcopy Create free account
hub / github.com/ReadyTalk/avian / Java_java_io_File_delete

Function Java_java_io_File_delete

classpath/java-io.cpp:385–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385extern "C" JNIEXPORT void JNICALL
386Java_java_io_File_delete(JNIEnv* e, jclass, jstring path)
387{
388 string_t chars = getChars(e, path);
389 int r;
390 if (chars) {
391#ifdef PLATFORM_WINDOWS
392 if (GetFileAttributes(chars) & FILE_ATTRIBUTE_DIRECTORY) {
393 r = !RemoveDirectory(chars);
394 } else {
395 r = REMOVE(chars);
396 }
397#else
398 r = REMOVE(chars);
399#endif
400 if (r != 0) {
401 throwNewErrno(e, "java/io/IOException");
402 }
403 releaseChars(e, path, chars);
404 }
405}
406
407extern "C" JNIEXPORT jboolean JNICALL
408 Java_java_io_File_canRead(JNIEnv* e, jclass, jstring path)

Callers

nothing calls this directly

Calls 3

getCharsFunction · 0.85
throwNewErrnoFunction · 0.85
releaseCharsFunction · 0.85

Tested by

no test coverage detected