org.wso2.carbon.integration.common.utils
Class FileManager

java.lang.Object
  extended by org.wso2.carbon.integration.common.utils.FileManager

public class FileManager
extends Object


Constructor Summary
FileManager()
           
 
Method Summary
static void copyFile(File sourceFile, String destinationPath)
           
static void copyJarFile(File sourceFile, String destinationDirectory)
           
 void copyJarFile(String sourceFileLocationWithFileName, String destinationDirectory)
           
static File copyResourceToFileSystem(String sourcePath, String targetPath, String fileName)
           
static boolean deleteFile(String filePathWithFileName)
           
static String readFile(File file)
           
static String readFile(String filePath)
           
static void writeToFile(String filePath, String content)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager

public FileManager()
Method Detail

readFile

public static String readFile(String filePath)
                       throws IOException
Throws:
IOException

readFile

public static String readFile(File file)
                       throws IOException
Throws:
IOException

writeToFile

public static void writeToFile(String filePath,
                               String content)
                        throws IOException
Throws:
IOException

copyFile

public static void copyFile(File sourceFile,
                            String destinationPath)
                     throws IOException
Throws:
IOException

copyResourceToFileSystem

public static File copyResourceToFileSystem(String sourcePath,
                                            String targetPath,
                                            String fileName)
                                     throws IOException
Throws:
IOException

copyJarFile

public void copyJarFile(String sourceFileLocationWithFileName,
                        String destinationDirectory)
                 throws IOException,
                        URISyntaxException
Throws:
IOException
URISyntaxException

copyJarFile

public static void copyJarFile(File sourceFile,
                               String destinationDirectory)
                        throws IOException
Throws:
IOException

deleteFile

public static boolean deleteFile(String filePathWithFileName)


Copyright © 2015 WSO2. All rights reserved.