Workflow for reading and writing files
        Posted  
        
            by 
                AIR_PhillipSenn
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by AIR_PhillipSenn
        
        
        
        Published on 2011-01-07T22:40:11Z
        Indexed on 
            2011/01/07
            22:53 UTC
        
        
        Read the original article
        Hit count: 211
        
In Workflow for reading and writing files the authors use these two lines of code:
var file = air.File.documentsDirectory; 
file = file.resolvePath("AIR Test/testFile.txt");
But I think that it's using one variable for two different meanings, isn't it?
Wouldn't it be better to write them as:
var myDocumentsDirectory = air.File.documentsDirectory; 
var myTestFile = myDocumentsDirectory.resolvePath("AIR Test/testFile.txt");
© Stack Overflow or respective owner