Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8207193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:55:17+00:00 2026-06-07T08:55:17+00:00

In my app, I used this code: File DirectoryPath = cw.getDir("custom", Context.MODE_PRIVATE); While creating

  • 0

In my app, I used this code:

File DirectoryPath = cw.getDir("custom", Context.MODE_PRIVATE); 

While creating a directory, and it returns:

/data/data/com.custom/app_custom**

So my question is why this app_ appears along with directory name. I know its default, but what actually it means?

And secondly, how can I create a sub-directory inside my directory i.e. app_custom in this case. if anyone knows please help me to understand this concept of getDir.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:55:19+00:00Added an answer on June 7, 2026 at 8:55 am

    You can create a new Directory using the path that you are getting from getDir(),

            File file = getDir("custom", MODE_PRIVATE);
            String path = file.getAbsolutePath();
            File create_dir = new File(path+"/dir_name");
            if(!create_dir.exists()){
                create_dir.mkdir();
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a rails app and have used this code in one of
I have an Asp.net app that simply reads an xml file and this code
This code extract is from database.sql file that comes with KohanaJobs app. CREATE TABLE
I have seen this code in web.xml file <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> I build small
In C++ WinAPI application I open the file using this code CreateFileW(path,FILE_APPEND_DATA,FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); While the
I used this MSDN example to construct my console host app: http://msdn.microsoft.com/en-us/library/ms731758.aspx It works
I made a twitter integration to my android app. I used this great tutorial,
I am developing a simple sip-based voip app for android. I used this sample
In MVC app, I am having this big object that is used in classic
I know how to share a text viz twitter,i used this code to integrate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.