Android Context File Mode

Source: Internet
Author: User

In Android, you can use the context to quickly open the Io object of a Java file. One of the parameters is the operation mode of the file.

As follows:


context.mode_private : As the default mode of operation, the file is private data and can only be accessed by the application itself, in which the contents of the original file are overwritten, if you want to append the newly written content to the original file. You can use context.mode_append

Context.mode_append : The mode checks whether the file exists, appends content to the file, or creates a new file.

context.mode _world_readable and context.mode _world_writeable Used to control whether other apps have permission to read and write to the file.

mode_world_readable : Indicates that the current file can be read by another application;

mode_world_writeable : Indicates that the current file can be written by another application.


This article is from the "Siege Lion" blog, please be sure to keep this source http://crazyzxl.blog.51cto.com/8781147/1714679

Android Context File Mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.