var writeStatus = ""; var allowedFileTypes = "css"; if ( ListFindNoCase(allowedFileTypes,ListLast(arguments.FilePath,".")) EQ 0 ) return "not-css-file"; writeStatus = writeDataFile(filePath=arguments.filePath,dataString=arguments.dataString,overwrite=arguments.overwrite,charSet=arguments.charSet); return writeStatus; var writeStatus = ""; var dirCreate = StructNew(); var allowedFileTypes = "ini,xml,wddx,txt,css,log"; if ( ListFindNoCase(allowedFileTypes,ListLast(arguments.FilePath,".")) EQ 0 ) return "invalid-file-type"; ---> var retStr = arguments.filePath; if ( FindNoCase(arguments.charToFind,retStr,1) ) retStr = ReplaceNoCase(retStr,arguments.charToFind,arguments.charToReplace,arguments.scope); return retStr; var fullPath = fixFilePathSlashes(arguments.filePath); var folderPath = GetDirectoryFromPath(fullPath); var retStatus = StructNew(); // If folder exists the we are done here... move on if ( DirectoryExists(folderPath) ) retStatus.status = "dir-exists"; else { try { CreateObject("java", "java.io.File").init(folderPath).mkdirs(); retStatus.status = "dir-created"; } catch (any e) { retStatus.status = "dir-create-failed"; } } return retStatus;