## org.eclipse.emf.ant.util
Class Util

    java.lang.Object
      org.eclipse.emf.ant.util.Util

    public class Util

extends java.lang.Object

Utility classes with generic methods that may be used by more than one task.

Since:
  2.1.0

Constructor Summary
`Util()`

Method Summary
`static int` `removeVersion(java.io.File parentDir)` Removes the version number of all the subdirectories of a given directory.
`static void` `writeFile(java.io.File file, java.lang.String content)` Writes the given content to the specifed file.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Util

    public Util()

Method Detail

### removeVersion

    public static int removeVersion(java.io.File parentDir)

  Removes the version number of all the subdirectories of a given directory. The expected format of the directories name is <dirName>_<version> where version has at least from 1 to 4 fields, the first 3 being digits. Examples: foo_2, foo_2.1, foo_2.1.0, foo_2.1.0.a,

  Parameters:
    `parentDir` - the parent of the directories that will have the version removed
  Returns:
    the number of changed directories

### writeFile

    public static void writeFile(java.io.File file,
                                 java.lang.String content)
                          throws java.io.IOException

  Writes the given content to the specifed file.

  Parameters:
    `file` - The file to be written or overwritten.
    `content` -
  Throws:
    `java.io.IOException`

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.