Closed johnbradley closed 5 years ago
Includes changes based on comments above and feedback from users.
DukeDS.move_file_or_folder(< project_name >, < source_remote_path >, < target_remote_path >)
project_name
- name of the project containing the file/foldersource_remote_path
- remote path specifying the file/folder to be movedtarget_remote_path
- remote path specifying where to move the file/folder toThis method works for folders as well.
Client().get_project_by_name(< project_name >)
project_name
- name of the project to find, raises exception if one project not foundThe create_upload
parameter is now storage_provider_id
so this method needed to be updated.
https://github.com/Duke-GCB/DukeDSClient/blob/0361e1fc9ddf501deb5a438186415c62a1d6adb1/ddsc/sdk/client.py#L193-L195
Adds methods to rename and move files
DukeDS.move_file(< project_name >, < file_remote_path >, < parent_remote_path >)
project_name
- name of the project that contains the a filefile_remote_path
- remote path to file to be movedparent_remote_path
- remote path to a folder to move the file into, empty or None specifies top level directory.DukeDS.rename_file(< project_name >, < file_remote_path >, < name >)
project_name
- name of the project that contains the a filefile_remote_path
- remote path to file to be renamedname
- new name of the fileThese methods also work for folders as well.
Adds sdk.Client method to find a project by name
Client().get_project_by_name(< project_name >)
project_name
- name of the project to find, raises exception if one project not foundFixes part of #243