Truthy File
authorTom Jackson <tjackson@fb.com>
Tue, 5 Mar 2013 19:05:42 +0000 (11:05 -0800)
committerJordan DeLong <jdelong@fb.com>
Tue, 19 Mar 2013 00:08:14 +0000 (17:08 -0700)
commit9d7cc509a90f551b1db5906895997146bc923a57
tree744cc6d37a1605431c02fd770c1718a8680de982
parentf4cbf351c0943c93a98388461a2d00341b3e7ac5
Truthy File

Summary:
File has a default constructor so it can be initialized late, but it
doesn't have a good canonical way to see if it's been initialized. This adds an
//explicit// operator bool so you can test files like `if (file) ...`.

Test Plan: Unit tests

Reviewed By: chaoyc@fb.com

FB internal diff: D726914
folly/File.h
folly/test/FileTest.cpp