i am currently working on a filesystem structure. ive seen some other code that has a method called endsWith...to check the end of a string for a certain character. i looked in the API and java in a nutshell book , but didnt it see it in any classes. Am i missing this? or is this method a user defined one? if it isnt, it would make things much easier =). also. what is the correct syntax for the following. this code is to see if a directory actually exists.
i am not sure if i am using ot corectly,but more or less, i read a string into a method that will return the full path if the dir exists. the string is first converted to a vector, so that is why you see the path.size() method there. one last Q. i have a method that keeps track of where the user goes in the file structure(general tree)called currentDirNode that takes 2 inputs, one of GeneralTree and one of STring.Signature looks like
the ref is a node where the relative path starts from. along with this, i track a string called CurrentDirectory. now, i have another method called getFullPath that only takes a String as input. This method is supposed to return the full path if the String that is passed in is a relative one. problem is, my currentDirectory info is located in the other method....how can i access that information from my getFullPath method? i cant just pass the path value over to the other method since that requires to inputs. I hope i explained it well enough so some people can give me some feedback, im literally at a brick wall now for the past 2.5 hours.