Package net.sourceforge.javautil.common.io

Examples of net.sourceforge.javautil.common.io.IVirtualFile.rename()


  public static IVirtualFile rotate (IVirtualDirectory directory, String prefix, String extension, int maxRotations) {
    for (int i=maxRotations; i>0; i--) {
      IVirtualFile rotation = directory.getFile(getRotatedFileName(prefix, extension, i));
      if (rotation != null) {
        if (i == maxRotations) rotation.remove();
        else rotation.rename(getRotatedFileName(prefix, extension, i+1));
      }
    }
    return directory.getFile(getRotatedFileName(prefix, extension, 1), true);
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.