Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified functions #138

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Commits on Apr 10, 2020

  1. Added moveFile and moveFolder functions

    In preparation for unified functions, added `moveFile` and `moveFolder` functions:
    + This will make the API for move consistent with copy and delete.
    + It will allow us to create a unified move function independent of existing
      functionality.
    CxRes committed Apr 10, 2020
    Configuration menu
    Copy the full SHA
    5836b70 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2020

  1. Unified Copy Function

    The new `copy` function unifies `copyFile` and `copyFolder`.
    It determines whether the source is a file or folder from the server response (without the need for an extra network request) instead of the trailing slash on provided source url.
    CxRes committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    cd83ba3 View commit details
    Browse the repository at this point in the history
  2. Optimized Link Copying

    Reuses prior GET and PUT responses to get links for copying.
    This saves unnecessary extra HEAD calls being made to fetch links. Logic for copying links remains unchanged.
    CxRes committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    fd67dbf View commit details
    Browse the repository at this point in the history
  3. Improved Input Error Handling for Copy

    The error handling for inputs is placed in its own function, which tests:
    + if inputs are strings
    + if source and destination are not the same
    + if the source is not a parent of the destination
    CxRes committed Apr 11, 2020
    Configuration menu
    Copy the full SHA
    49ae3bc View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2020

  1. Unified Remove Function

    The new `remove` function unifies both `deleteFile` and `deleteFolder`.
    (It can't be called `delete`, which is already reserved by the low level API)
    
    It determines whether the source is a file or folder from the server response
    (HEAD call is reused in case of file deletion) instead of the presence of a trailing slash on provided source url.
    CxRes committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    b14fabc View commit details
    Browse the repository at this point in the history
  2. Unified Move Function

    The new `move` function that builds upon the unified `copy` and `remove` functions
    It avoids the unnecessary duplication of work that resulted from running copy and
    delete separately.
    CxRes committed Apr 12, 2020
    Configuration menu
    Copy the full SHA
    5bde7f8 View commit details
    Browse the repository at this point in the history