java.io.File.canRead C# (CSharp) Method

canRead() private method

private canRead ( ) : bool
return bool
        public virtual bool canRead()
        {
            global::net.sf.jni4net.jni.JNIEnv @__env = this.Env;
            using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 10)){
            return ((bool)(@__env.CallBooleanMethod(this, global::java.io.File.j4n_canRead12)));
            }
        }

Usage Example

コード例 #1
0
        protected override void onListItemClick(ListView l, android.view.View v, int position, long id)
        {
            File file = new File((string)path.get(position));

            if (file.isDirectory())
            {

                if (file.canRead())
                {
                    getDir((string)path.get(position));
                }
                else
                {
                    new AlertDialog.Builder(this)
                        //.setIcon(R.drawable.ic_launcher)
                        .setTitle(file.getName() + "] folder can't be read!")
                        //.setPositiveButton("OK", null)
                        .show();
                }
            }
            else
            {
                new AlertDialog.Builder(this)
                    //.setIcon(R.drawable.ic_launcher)
                    .setTitle(file.getName() + "]")
                    //.setPositiveButton("OK", null)
                    .show();

            }

        }