问题
I am trying to find a way to compare two text files through Flex and show that diff in the UI. Is there a util or a way to do that?
回答1:
You can read local files with the FileReference object, so the answer is yes. Using this API you can load the files, but comparing them is not a feature that is built into the framework, so you will have to supply a mechanism to do that once the files are loaded.
More on loading local files can be found here: http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/.
来源:https://stackoverflow.com/questions/5871455/is-there-a-way-to-compare-text-files-through-flex