jeudi 29 janvier 2015

Java - Create a directory and add files from aws

I am trying to retrieve files from AWS and store them in a directory. I keep getting the following error:



java.io.FileNotFoundException: C:\Users\Matthew\AppData\Local\Temp\UPDATE_TEMP_5190592302690883358\aws (Access is denied)


Here is the code where it throws the error:



File outputFile = new File(tmpDirPath + File.separator + "aws");

outputFile.mkdirs();

FileOutputStream fos = new FileOutputStream(outputFile);


It complains before creating the FileOutputStream. I have tried outputFile.getParentFile().mkdirs(); as well but it creates aws as type File instead of a directory. Can someone explain why it throws access denied on the directory?





Aucun commentaire:

Enregistrer un commentaire