Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.projects.core
Class ResourceUtil

java.lang.Object
  extended by com.ibm.etools.iseries.projects.core.ResourceUtil

public class ResourceUtil
extends Object

Utility functions to manipulate IResource handles in the Workspace


Constructor Summary
ResourceUtil()
           
 
Method Summary
static void copyFile(IFile fromFile, IFile toFile, IProgressMonitor monitor)
          Copy one individual IFile.
static void ensureDirectoryExists(IPath filePath, IProject project, IProgressMonitor monitor)
          Make sure that the all of the containing directories exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceUtil

public ResourceUtil()
Method Detail

ensureDirectoryExists

public static void ensureDirectoryExists(IPath filePath,
                                         IProject project,
                                         IProgressMonitor monitor)
                                  throws CoreException
Make sure that the all of the containing directories exist. If they do not then create them.

Parameters:
filePath - - the IPath of the file whose directories are being created
project - = the IProject that this this path is in reference to
monitor - - a IProgressMonitor to reflect progress
Throws:
CoreException

copyFile

public static void copyFile(IFile fromFile,
                            IFile toFile,
                            IProgressMonitor monitor)
                     throws CoreException
Copy one individual IFile. If the target file exists, simply override its contents, otherwise create it and any necessary parent directories.

Parameters:
fromFile -
toFile -
Throws:
CoreException - if anything goes wrong with the replace or copy

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.