This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 34730
Collapse All | Expand All

(-)FileObject.java (-7 / +13 lines)
Line 18 Link Here
18
import java.util.StringTokenizer;
Line 520 Link Here
520
    /** Retrieve file or folder contained in this folder by name (no extension
521
    /** Retrieve file or folder relative to a current folder, with a given rel
521
--
Line 522 Link Here
522
    * @param name basename of the file (in this folder)
523
    * @param relativePath is just basename of the file or the relative path de
523
--
Lines 527-528 Link Here
527
    public final FileObject getFileObject (String name) {
528
    public final FileObject getFileObject (String relativePath) {
528
        return getFileObject (name, null);
529
        if (relativePath.startsWith("/")) {
529
--
530
            relativePath = relativePath.substring(1);
531
        }
532
        FileObject myObj = this;
533
        StringTokenizer st = new StringTokenizer(relativePath, "/");
534
        while (myObj != null && st.hasMoreTokens()) {
535
            myObj = myObj.getFileObject(st.nextToken(), null);
536
        }
537
        return myObj;
Line 531 Link Here
Line 684 Link Here

Return to bug 34730