Java File Size Get getFileSize(final String path)

Here you can find the source of getFileSize(final String path)

Description

get File Size

License

Open Source License

Declaration

public static long getFileSize(final String path) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.File;

public class Main {
    public static long getFileSize(final File file) {
        return file.length();
    }//  w  w  w .  ja  va  2 s . c  o  m

    public static long getFileSize(final String path) {
        return getFileSize(getFile(path));
    }

    public static File getFile(final String path) {
        return new File(path);
    }
}

Related

  1. getFileSize(File file)
  2. getFileSize(File file)
  3. getFileSize(File[] files)
  4. getFileSize(final String filename)
  5. getFileSize(final String filePath)
  6. getFileSize(InputStream inputStream)
  7. getFileSize(int fileSize)
  8. getFileSize(long fileSize)
  9. getFilesize(String address)