Java File Size Get getFileSize(String filename, String dir)

Here you can find the source of getFileSize(String filename, String dir)

Description

get File Size

License

Apache License

Declaration

public static int getFileSize(String filename, String dir) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    public static int getFileSize(String filename, String dir) {
        File file = new File(dir, filename);
        int size = (int) (file.length());
        return size;
    }/*  www.  j ava2 s. c o  m*/
}

Related

  1. getFilesize(String address)
  2. getFileSize(String fileName)
  3. getFileSize(String filename)
  4. getFileSize(String filename)
  5. getFileSize(String fileName, Logger log)
  6. getFileSize(String filePath)
  7. getFileSize(String filePath)
  8. getFileSize(String filePath)
  9. getFileSize(String filepath)