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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:46:22+00:00 2026-05-25T20:46:22+00:00

If I call one of the methods File.mkdir() or File.mkdirs() in Java, and it

  • 0

If I call one of the methods File.mkdir() or File.mkdirs() in Java, and it returns false, is there a way to know why was the directory not created?

  • 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-05-25T20:46:23+00:00Added an answer on May 25, 2026 at 8:46 pm

    Not really, no. If a SecurityException is NOT thrown, then the most likely cause is a typo in the path, meaning you’ve accidentally specified a parent path to the new directories that is somehow invalid.

    I don’t suppose you have it wrapped in a try { ... } catch (Exception e) block, where you don’t realize a SecurityException is being thrown, because you’re catching an ancestor of SecurityException, do you?

    If you have a high belief that everything looks right, and it still fails, I suppose you could simply put it in a loop to retry, say, three times. If it still fails, and depending on your application, you might raise some kind of alert at the UI level, or log the error in a log file (assuming you can write to it).

    I suppose it’s possible that some deeper I/O issue is preventing it from working, but beyond simply notifying the user of a failure there isn’t much you can (or really should) do at an application level. If there’s something deeper in the I/O wrong, that’s more likely a problem with the system/hardware/OS, or something completely wonky that you have no control over like a subsystem/service crash.

    …and if that’s happening, that’s the responsibility of the IT guy to fix, not your application. Unless of course your app is somehow causing the crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to call a method in one class from another class.
I have a .net dll file. I have to call one of the methods
Can we call COM exposed interface methods at runtime one by one? This can
Below I call the same methods in author and w5 model objects. But one
Is there a shorthand version of this. I want to call one sequence and
Does anyone know of any methods to create a file upload progress bar in
when overriding the loadView method in UIViewController, should one call [super loadView] in the
In Ruby, how do you call a class method from one of that class's
Can I call public method from within private one: var myObject = function() {
I have one doubt concerning c# method overloading and call resolution. Let's suppose I

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.