private bool loadDataAndPopulateObjects(String sFileToLoad, String sRootDirectory) { try { sFullPathToProcessedFile = sFileToLoad; sFileName = Path.GetFileName(sFullPathToProcessedFile); sFileContents = Files.getFileContents(sFullPathToProcessedFile); this.sRootDirectory = sRootDirectory; sFullPathToOriginalFile = sFullPathToProcessedFile.Replace(velocityloader.sExtensionOfProcessedVelocityFiles, velocityloader.sExtensionOfVelocityFiles); if (false == File.Exists(sFullPathToOriginalFile)) sFullPathToOriginalFile = ""; // make it "" if the original file is not there lsFileLines = Files.getFileLines(sFullPathToProcessedFile); foreach (String sLine in lsFileLines) { var vnVelocityNode = new velocity.VelocityNode(sLine); lvnVelocityNodes.Add(vnVelocityNode); } return true; } catch (Exception Ex) { DI.log.error("In loadDataAndPopulateObjects: {0}", Ex.Message); return false; } }
private bool loadDataAndPopulateObjects(String sFileToLoad, String sRootDirectory) { try { sFullPathToProcessedFile = sFileToLoad; sFileName = Path.GetFileName(sFullPathToProcessedFile); sFileContents = Files.getFileContents(sFullPathToProcessedFile); this.sRootDirectory = sRootDirectory; sFullPathToOriginalFile = sFullPathToProcessedFile.Replace(velocityloader.sExtensionOfProcessedVelocityFiles, velocityloader.sExtensionOfVelocityFiles); if (false == File.Exists(sFullPathToOriginalFile)) { sFullPathToOriginalFile = ""; // make it "" if the original file is not there } lsFileLines = Files.getFileLines(sFullPathToProcessedFile); foreach (String sLine in lsFileLines) { var vnVelocityNode = new velocity.VelocityNode(sLine); lvnVelocityNodes.Add(vnVelocityNode); } return(true); } catch (Exception Ex) { DI.log.error("In loadDataAndPopulateObjects: {0}", Ex.Message); return(false); } }