Jump to content
Larry Ullman's Book Forums

Chapter 11 - Navigating Directories

Recommended Posts

Hi i was wondering if someone could help me understand why in the chapter "navigating directories" the substr function is there. If i take it away then . and .. appears on top of the folders. I read in the book that "That same conditional also checks that the current item isn’t the current directory (marked by a single period on Unix systems) or the parent directory (marked by a double period on Unix

systems". But from what i can tell is that the path would be something like this -> /.folder_name . Does the period before a folder show that it is in the same directory because i thought it would go something like this -> ./folder_name.


Thanks in advance


Link to comment
Share on other sites

  • 5 years later...

  • Create New...