Skip to content

file doesn't exists the first time #4

Description

As developer I want to be able to read the file at any time, to read the file's content.

Description

When we call urlForFile(_ filename: String) the first time (e.g. to run a unit tests with default file content), but never called any update...() before, the file does not exist.

Expected behavior

The given url from urlForFile(_ filename: String) should be valid.

Suggestion

It might be appropriate to verify if the file does exists like FileManager.default.fileExists(atPath: fileUrl.path) or similar and as fallback just return the url received from the bundle.

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