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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:25:49+00:00 2026-06-14T20:25:49+00:00

I want to load a directory in actionscript. To do that I use the

  • 0

I want to load a directory in actionscript. To do that I use the File class but sadly it doesn’t work.

Here is what I did. First I created the directory in the applicationStorageDirectory using this code:

var root:File = File.applicationStorageDirectory.resolvePath(UIDUtil.createUID());
root.createDirectory();

After that I dispatch an event so that the application copies some files into that folder. To do that I use the method File.copyToAsync (that works, so this is not the problem). When all files are copied to that directory I try to load that directory using the File call again. The reason I want to do that is, that I need the content/data as a byte array. The data property of the File class is only set when the load method is called successfully before.

Since the directory is in the application storage directory (the url property of the file object has this content: app-storage:/FF011DBC-2E92-46A8-D5F8-29FE1DD8FA7A) I thought just calling the load method would work. I was wrong… Although the documentation of that method says I can just call that method when the application runs in AIR and the file to load is inside the application sandbox, I get the following error:

Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error.
at flash.filesystem::File/resolveComponents()
at flash.filesystem::File/resolvePath()
    ...

Do you have any ideas what could be wrong? Is it even possible to load a directory using the File class? Or does that error occur because the isDirectory flag is set to true in the file object?

kind regards
Markus

  • 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-14T20:25:51+00:00Added an answer on June 14, 2026 at 8:25 pm

    I believe a File, when pointing to a directory, does not contains the data of the files contained inside it. You would have to use File.getDirectoryListing() to loop over all files the folder, and append their bytes to the ZIP archive separately. Don’t forget to check if you come across sub-directory…

    You can check this link for an example of how to do this.

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

Sidebar

Related Questions

I'm working on a actionscript 3 flash file wherein I want to use multiple
I want to load an image that exists outside the application directory for example
I have images in my app's documents directory but I want to load images
I have a simple data file that I want to load, in a C++
in my resources directory i have a file called lsf.plist i want to load
at first sorry my bad English I want load model in my plugin controller
I want to load an image via css that stretches to the entire screen.
I want to load multiple languages to use IVONA SDK with SSML for iPhone.
I want to load PNG-file from resources. There is a roughly MFC-way (with CResourceStream
I want to load multiple variables into one .mat file at the end of

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.