Skip to content

CodeIgniter\Files\File() and FileNotFoundException issue with creating new files #548

Description

@timothymarois

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

The file does not need to exist.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions