I have come across two methods of calling a file class: File and ::File
Can someone explain to me the difference between the two, and also the separate reasons for using the two?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Filerefers to theFileconstant in the current scope, while::Filealways refers toObject::File.Thus, the
::is analogous to the root of a file system and the module you are in is analogous to the current directory.For object-oriented access to the current lexical scope, see Module.nesting.