Skip to content

Entries: fix gaps in the entry algorithms #239

Open

Description

@annevk

The algorithms carried over from the File and Directory Entries API in #222 have several gaps:

  • getParent(), getFile(), and getDirectory() create a new entry with a name and full path, but no root. Later operations on the resulting object evaluate paths against that root.
  • readEntries() passes the directory's members (files and directories) to successCallback, but the callback expects FileSystemEntry objects. The steps need to create FileSystemFileEntry and FileSystemDirectoryEntry objects, each with a name, full path, and root.
  • Once the reader is done, readEntries() invokes successCallback "with an empty list", which invokes it with no arguments. It needs to pass an empty list as the argument: « « » ».
  • getParent() invokes the optional successCallback, and readEntries() invokes the optional errorCallback when a read is already in progress, without checking whether they were given.
  • The filesystem getter returns the file system concept rather than a FileSystem object. The FileSystem root getter associates a FileSystemDirectoryEntry with a root directory rather than with an entry. Neither defines whether repeated gets return the same object.

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