You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding this as an issue because you're unable to create a file using the file class. It automatically hits FileNotFoundException when the file does not exist, and preventing $file->openFile('w') from allowing it to create the file.
Technically it will need to exist, because without using a try/catch the application will crash. Forcing you to use the default fopen if you need to create the file on the fly.
The text was updated successfully, but these errors were encountered:
Ah. Looks like docs may be off there, since you can bypass the exception by passing false as the second parameter in the constructor:
$file = new File($path, false);
I'm guessing I originally meant it to be default to false... and then forgot to change docs when it was changed. Most likely while I was working on the Image library.
I'm adding this as an issue because you're unable to create a file using the file class. It automatically hits
FileNotFoundException
when the file does not exist, and preventing$file->openFile('w')
from allowing it to create the file.As for documentation: Getting a File instance
Technically it will need to exist, because without using a
try/catch
the application will crash. Forcing you to use the defaultfopen
if you need to create the file on the fly.The text was updated successfully, but these errors were encountered: