Java File Name Get getFileNames(File[] files)

Here you can find the source of getFileNames(File[] files)

Description

get File Names

License

Open Source License

Declaration

private static String[] getFileNames(File[] files) 

Method Source Code

//package com.java2s;
/**/*w w w .jav  a  2s .c  om*/
* This file is part of dev.utils.
*
* dev.utils is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with dev.utils.  If not, see <http://www.gnu.org/licenses/>.
*
* File      : FileHelper.java
* Created   : November 28, 2006, 5:13 PM
*/

import java.io.File;

public class Main {
    private static String[] getFileNames(File[] files) {
        String[] fileNames = new String[files.length];

        for (int i = 0; i < fileNames.length; i++) {
            fileNames[i] = files[i].getName();
        }

        return fileNames;
    }
}

Related

  1. getFileNamePart(final File file)
  2. getFilenameParts(File file)
  3. getFileNames(byte[] zipFile)
  4. getFileNames(File path, Vector result)
  5. getFileNames(File zipFile, Pattern pattern)
  6. getFilenames(File[] files)
  7. getFileNames(final String path, final String regex)
  8. getFileNames(final String pDataDir, final String pFilter)
  9. getFilenames(String dir, FilenameFilter filter)