Lines Matching refs:filePath

403      * @param filePath
409 public static String getLineByNumber(String filePath, int lineNum) {
415 LineNumberReader reader = getLineNumReader(filePath);
497 * @param filePath
507 public static String getLineWithPattern(String filePath, String pattern,
519 LineNumberReader reader = getLineNumReader(filePath);
558 * @param filePath
568 public static int getFirstOccurence(String filePath, String pattern,
579 LineNumberReader reader = getLineNumReader(filePath);
618 * @param filePath
627 public static int getFirstOccurence(String filePath, String pattern,
629 return getFirstOccurence(filePath, pattern, matchBegin, matchEnd,
637 * @param filePath
646 public static int getLastOccurence(String filePath, String pattern,
655 LineNumberReader reader = getLineNumReader(filePath);
955 * @param filePath
962 public static boolean insertLineByNumber(String filePath, int lineNum,
969 LineNumberReader reader = getLineNumReader(filePath);
983 String tempFilePath = filePath + ".tmp";
990 copyFile(tempFilePath, filePath);
1009 * @param filePath
1018 public static boolean removeLinesByNum(String filePath, int lineNum,
1022 String line = removeLinesByNumber(filePath, lineNum, numLines);
1037 * @param filePath
1044 public static String removeLinesByNumber(String filePath, int lineNum,
1051 LineNumberReader reader = getLineNumReader(filePath);
1069 String tempFilePath = filePath + ".tmp";
1076 copyFile(tempFilePath, filePath);
1092 * @param filePath
1096 public static boolean appendLinesToFile(String filePath,
1098 return appendLinesToFile(filePath, linesToAppend, false);
1104 * @param filePath
1109 public static boolean appendLinesToFile(String filePath,
1114 LineNumberReader reader = getLineNumReader(filePath, create);
1125 String tempFilePath = filePath + ".tmp";
1131 result = copyFile(tempFilePath, filePath);
1180 * @param filePath
1186 private static boolean writeToFile(String filePath, Writer writer) {
1192 File destFile = new File(filePath);
1358 * @param filePath
1363 private static LineNumberReader getLineNumReader(String filePath) {
1364 return getLineNumReader(filePath, false);
1371 * @param filePath the path to the file
1377 private static LineNumberReader getLineNumReader(String filePath, boolean create) {
1382 File srcFile = new File(filePath);