FileFolderService offers the following API
resolveNamePath [Source]
FileInfo resolveNamePath(NodeRef rootNodeRef,
                         java.util.List<java.lang.String> pathElements)
                         throws FileNotFoundException
    Resolve a file or folder name path from a given root node down to the final node.
    Parameters:
        rootNodeRef - the start of the path given, i.e. the '/' in '/A/B/C' for example
        pathElements - a list of names in the path 
    Returns:
        Returns the info of the file or folder 
    Throws:
        FileNotFoundException - if no file or folder exists along the path
from there you get a FileInfo from which you can obtain a NodeRef from which you can obtain a node ID