I am wondering if there is a quick simple way to check whether a file path comes under another path. For example, given C:FruitAppleCore, I want to test it against a list of files, which contains C:FruitApple, and be able to tell that it is contained within that path.
就在我撰写这个问题时,我可以简单地将较长的档案放在目前的档案中。
因此,我现在要知道的是,用什么方法对待档案物体? 或者,如上所述,更容易获得每条道路的铺设版。 (我仍在使用java 1.6,因此不能使用java.nio.Path;)