public static String formatFileSize(long length) {
        if (length > (1 << 20)) {
            return length / (1 << 20) + "M";
        } else if (length > (1 << 10)) {
            return length / (1 << 10) + "K";
        }
        return length + "B";
    }
Get file name from file path

@param path file path
@return file name
src/cn/ieclipse/smartim/common/IMUtils.java