Package lombok

Examples of lombok.val.createNewFile()


      if (!file.isFile())
        throw new FileNotFoundException("The specified path is not referring to a file: " + fileAbsPath);

      // set to current date/time (millis since 1/1/1970)
      file.setLastModified(System.currentTimeMillis());
    } else if (!file.createNewFile())
      throw new IOException("Could not touch file, because creation of new file failed.");
  }

  /**
   * Touches a file, i.e. creates it if not there, otherwise updates its last write time. Returns true if succeeded. No exception is thrown
View Full Code Here


      if (!file.isFile())
        throw new FileNotFoundException("The specified path is not referring to a file: " + fileAbsPath);

      // set to current date/time (millis since 1/1/1970)
      file.setLastModified(System.currentTimeMillis());
    } else if (!file.createNewFile())
      throw new IOException("Could not touch file, because creation of new file failed.");
  }

  /**
   * Touches a file, i.e. creates it if not there, otherwise updates its last write time. Returns true if succeeded. No exception is thrown
View Full Code Here

  {
    // check source is readable/writable
    val folderPath = new File(folderName);
    val randomFilename = new File(folderPath, UUID.randomUUID() + ".crwd");

    if (!randomFilename.createNewFile())
      throw new IOException("Could not create file: " + randomFilename.getAbsolutePath());
    if (!randomFilename.delete())
      throw new IOException("Could not delete file: " + randomFilename.getAbsolutePath());

    try
View Full Code Here

  {
    // check source is readable/writable
    val folderPath = new File(folderName);
    val randomFilename = new File(folderPath, UUID.randomUUID() + ".crwd");

    if (!randomFilename.createNewFile())
      throw new IOException("Could not create file: " + randomFilename.getAbsolutePath());
    if (!randomFilename.delete())
      throw new IOException("Could not delete file: " + randomFilename.getAbsolutePath());

    try
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.