Hi once more,

This looks weird. Does this code work on your machine? (change package
in file path) This code, for my package, returns "true true" so those
methods work for me.

        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                File file = new File("/data/data/your.package/");

                Log.i("FilePermissionTester.onCreate()", file.canRead() + " "
                        + file.canWrite());
        }


On Nov 14, 2:30 am, Protocol-X <[EMAIL PROTECTED]> wrote:
> i tried but it keeps giving me errors and asking if i want to create a
> method canRead or canWrite
>
> On Nov 13, 7:44 pm, szeldon <[EMAIL PROTECTED]> wrote:
>
> > What about canRead() and canWrite() methods from File class?
>
> > On Nov 14, 12:11 am, Protocol-X <[EMAIL PROTECTED]> wrote:
>
> > > Heyeveryone,
>
> > > Ive been tryign to figure out how to check to see if a file has read/
> > > write permissions, or just read only permissions and have not been
> > > able to find a way that works in android.. If anyone has a working
> > > example they wouldnt mind throwing up it would be great.   Thanks in
> > > advance- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to