java - get IFolder from IPath for project root -
i have project mytestproject. want ifolder object root. ipath /mytestproject. ipath object need ifolder object.
i have folder under project resource. ipath /mytestproject/resource. ifolder using below code
ipath path; //and has value /mytestproject/resource final ifolder folder = resourcesplugin.getworkspace().getroot().getfolder(path);
please suggest way /mytestproject.
projects not have ifolder
objects, instead use iproject
.
both ifolder
, iproject
extend icontainer
interface methods available in both.
get iproject
project with
iproject project = resourcesplugin.getworkspace().getroot().getproject("project name");
so if want code work both ifolder
, iproject
use icontainer
interface.
Comments
Post a Comment