Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.TextUtils;

public class Main {
    public static String getFolderPath(String path) {
        String folderPath = "";

        if (!TextUtils.isEmpty(path)) {
            int i = path.lastIndexOf('/');
            if (i > 0) {
                folderPath = path.substring(0, i);
            }
        }

        return folderPath;
    }
}