Java File Exist isFileExist(String assetDestinationLocation, String id, String assetId)

Here you can find the source of isFileExist(String assetDestinationLocation, String id, String assetId)

Description

Checks if is file exist.

License

Open Source License

Parameter

Parameter Description
assetDestinationLocation the asset destination location
id the id
assetId the asset id

Return

true, if is file exist

Declaration

public static boolean isFileExist(String assetDestinationLocation, String id, String assetId) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *******************************************************************************/

import java.io.File;

public class Main {
    /**//w  ww .  j  a  v a 2s .c o  m
     * Checks if is file exist.
     *
     * @param assetDestinationLocation the asset destination location
     * @param id the id
     * @param assetId the asset id
     * @return true, if is file exist
     */
    public static boolean isFileExist(String assetDestinationLocation, String id, String assetId) {
        String filePath = assetDestinationLocation + "/" + id + "/" + assetId + ".xml";
        return (new File(filePath).isFile());
    }
}

Related

  1. fileExistsAndReadable(String sourcePath)
  2. FileExistsNotEmpty(String filename)
  3. isFileExist(File file)
  4. isFileExist(File file, File folder)
  5. isFileExist(final String filePathString)
  6. isFileExist(String file)
  7. isFileExist(String fileNameAndPath)
  8. isFileExist(String filePath)
  9. isFileExist(String filePath)