The File class is what I was looking for. So assuming your file variable is an instance of the File class, then yes.