Files.fileExists or file.exists?

How would you design a class that abstracts, say, a file on a disk with certainproperties? Let���s say you need to be able to check whether the file exists onthe disk or has already been deleted. Would you create an object first and thencall the exists() method on it, or would you call Disk.fileExists() firstand only then, if TRUE is returned, make an instance of the File class andcontinue working with it? This may sound like a matter of taste, but it���s notthat simple.

[image error]Capote (2005) b...
 •  0 comments  •  flag
Share on Twitter
Published on July 06, 2024 17:00
No comments have been added yet.