String resource = dirName.substring(dirName.lastIndexOf(IPath.SEPARATOR)); FileDescriptor fd = new FileDescriptor(); fd.setFilename (dirName); fd.setDirectory(true); fileDescriptorContainer.addFileDescriptor (fd);
IFileDescriptorContainer fd = root; StringTokenizer tz = new StringTokenizer(dirName, ""+IPath.SEPARATOR); while (tz.hasMoreTokens()) { String resource = tz.nextToken(); FileDescriptor tmp = fd.getFileDescriptor(resource); if (tmp == null) { tmp = new FileDescriptor(); tmp.setFilename(resource); tmp.setDirectory(true); fd.addFileDescriptor(tmp); } fd = tmp; }
    public static void createDirectory(String dirName,     											IFileDescriptorContainer fileDescriptorContainer)     {        String resource = dirName.substring(dirName.lastIndexOf(IPath.SEPARATOR));        FileDescriptor fd = new FileDescriptor();    	fd.setFilename (dirName);    	fd.setDirectory(true);    	fileDescriptorContainer.addFileDescriptor (fd);    }