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 8790769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:44:34+00:00 2026-06-13T22:44:34+00:00

I need to create a directory full of data files. These files are are

  • 0

I need to create a directory full of data files. These files are are temporary, user-private files.

While the files are temporary, and it’s ok if they are deleted by the system, there’s a lot of them and I’d like to
reuse them if I can. Furthermore, I expect other applications (running as the same user) to access/create these files too. This means I need a standard protocol that will work across different programming languages.

Since I know someone will suggest it, I do not want to use ‘/tmp’ or ‘%TEMP% or the java system property java.io.tmpdir.
These directories are system-scoped. I’m also very interested in finding platform-standard or platform-approved methods over just finding a solution that works.

I’m trying to collect a list of where to locate these files for various platforms. Below is what I have so far, but I would really appreciate additional platforms and/or validation of what I’ve already found.

  • 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-13T22:44:36+00:00Added an answer on June 13, 2026 at 10:44 pm

    This is the best list I’ve found. If you have any corrections/suggestions, please let me know.

    On Windows:

    1. Create a directory “CompanyName” in the “local app data” directory. Find this via:

      1. The system environment variable LOCALAPPDATA, or
      2. Query the registry by executing the following command line:

        reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Local AppData
        

    On MacOSX:

    1. $TMPDIR or Cocoa function NSTemporaryDirectory()
      • Cleared automatically every three days
    2. mkdir -m 700 ~/Library/Caches/CompanyOrProductName
      • Not removed by system automatically (fine for my use case)
      • Not backed up by TimeMachine
    3. mkdir -m 700 ~/Library/Application Support/CompanyOrProductName
      • Not removed by system automatically (fine for my use case)
      • Backed up by TimeMachine

    On Linux:

    1. mkdir -m 700 ~/.company-name

    On Solaris / OpenSolaris:

    1. ?

    References:

    • Cocoa with Love explains the three MacOSX options above and also discusses several security issues.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a full list of the files and sub-directories in a
I need to create daemon that will monitor certain directory and will process every
I need to create this url: www.example.com/directory/[state]-financial-planners Where [state] will be different depending on
Need your help with authenticating an active directory user ID against LDAP. My problem
I have a directory full of hundreds of class files that have been constructed
I need create custom dialog and put JPanel into it. Is it possible?
i need create an email list sending to many emails. what is best solution
I need create clone repository. but I do not know where can I get
I need create a document word with Java. And I ask, how can I
i need create a variable with parent subclass. Example: Parent Class <?php class parentClass

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.