[Android] libvlc: Remove nativeIsPathDirectory

Jean-Baptiste Kempf git at videolan.org
Thu May 28 14:55:02 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 28 14:54:13 2015 +0200| [aa8b95c3b951894d54155ba2723771f34741074a] | committer: Jean-Baptiste Kempf

libvlc: Remove nativeIsPathDirectory

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=aa8b95c3b951894d54155ba2723771f34741074a
---

 libvlc/jni/libvlcjni-util.c                |   21 ---------------------
 libvlc/src/org/videolan/libvlc/LibVLC.java |    2 --
 2 files changed, 23 deletions(-)

diff --git a/libvlc/jni/libvlcjni-util.c b/libvlc/jni/libvlcjni-util.c
index 18e8ba6..e98952d 100644
--- a/libvlc/jni/libvlcjni-util.c
+++ b/libvlc/jni/libvlcjni-util.c
@@ -170,24 +170,3 @@ void Java_org_videolan_libvlc_LibVLC_nativeReadDirectory(JNIEnv *env, jobject th
     closedir(p_dir);
 }
 
-jboolean Java_org_videolan_libvlc_LibVLC_nativeIsPathDirectory(JNIEnv *env, jobject thiz, jstring path)
-{
-    jboolean isCopy;
-    /* Get C string */
-    const char* psz_path = (*env)->GetStringUTFChars(env, path, &isCopy);
-
-    jboolean isDirectory;
-    struct stat buf;
-    if(stat(psz_path, &buf) != 0)
-        /* couldn't stat */
-        isDirectory = JNI_FALSE;
-    else {
-        if(S_ISDIR(buf.st_mode))
-            isDirectory = JNI_TRUE;
-        else
-            isDirectory = JNI_FALSE;
-    }
-
-    (*env)->ReleaseStringUTFChars(env, path, psz_path);
-    return isDirectory;
-}
diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 1c5641f..34aad4c 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -220,8 +220,6 @@ public class LibVLC {
 
     public static native void nativeReadDirectory(String path, ArrayList<String> res);
 
-    public native static boolean nativeIsPathDirectory(String path);
-
     private native void setEventHandler(EventHandler eventHandler);
 
     private native void detachEventHandler();



More information about the Android mailing list