Output folder erased?

Just curious, upon making a module why are the output folders all erased before compiling?

If i am making a flex project and I wanted an external XML file next to the SWF so I threw it into my output folder
when i run a build the folder is erased and the swf is placed in. Just curious what is the mentality for erasing this folder?


thanks,
-ross

3 comments

I believe that it is to ensure that you have a clean build. Your source files that are to be compiled and deployed get placed into the out folder. And that out folder is wiped each time to ensure that you do not have orphaned old files. Such as you use to have file A and you did a build file A is now in the out folder. Then at some later point you decide you no longer want file A and remove it, if the out folder does not get cleared then file A would remain and could muff up things when deploying.

0

Ross,

First, there's an option named 'Clear output directory on rebuild' at Settings | Compiler dialog.

Nevertheless, consider keeping you xml file under the source root, so that it will be copied to the output directory on every compilation. Just check that *.xml is present at the same dialog in Resource Patterns field.

Regards,
Kirill

0

thanks to both you guys, that makes a lot more sense.


-ross

0

Please sign in to leave a comment.