diff --git a/assets/search.js b/assets/search.js
index 879f0f9..bd53044 100644
--- a/assets/search.js
+++ b/assets/search.js
@@ -1 +1 @@
-window.searchData = JSON.parse("{\"rows\":[{\"kind\":4194304,\"name\":\"GitHubRepository\",\"url\":\"types/GitHubRepository.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GitHubRepository.html#__type\",\"classes\":\"\",\"parent\":\"GitHubRepository\"},{\"kind\":1024,\"name\":\"owner\",\"url\":\"types/GitHubRepository.html#__type.owner\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"types/GitHubRepository.html#__type.name\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":1024,\"name\":\"pat\",\"url\":\"types/GitHubRepository.html#__type.pat\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":4194304,\"name\":\"GithubFile\",\"url\":\"types/GithubFile.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GithubFile.html#__type\",\"classes\":\"\",\"parent\":\"GithubFile\"},{\"kind\":1024,\"name\":\"sha\",\"url\":\"types/GithubFile.html#__type.sha\",\"classes\":\"\",\"parent\":\"GithubFile.__type\"},{\"kind\":4194304,\"name\":\"File\",\"url\":\"types/File.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/File.html#__type\",\"classes\":\"\",\"parent\":\"File\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"types/File.html#__type.data\",\"classes\":\"\",\"parent\":\"File.__type\"},{\"kind\":64,\"name\":\"default\",\"url\":\"functions/default.html\",\"classes\":\"\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,21.595]],[\"comment/0\",[]],[\"name/1\",[1,13.122]],[\"comment/1\",[]],[\"name/2\",[2,21.595]],[\"comment/2\",[]],[\"name/3\",[3,21.595]],[\"comment/3\",[]],[\"name/4\",[4,21.595]],[\"comment/4\",[]],[\"name/5\",[5,21.595]],[\"comment/5\",[]],[\"name/6\",[1,13.122]],[\"comment/6\",[]],[\"name/7\",[6,21.595]],[\"comment/7\",[]],[\"name/8\",[7,21.595]],[\"comment/8\",[]],[\"name/9\",[1,13.122]],[\"comment/9\",[]],[\"name/10\",[8,21.595]],[\"comment/10\",[]],[\"name/11\",[9,21.595]],[\"comment/11\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":1,\"name\":{\"1\":{},\"6\":{},\"9\":{}},\"comment\":{}}],[\"data\",{\"_index\":8,\"name\":{\"10\":{}},\"comment\":{}}],[\"default\",{\"_index\":9,\"name\":{\"11\":{}},\"comment\":{}}],[\"file\",{\"_index\":7,\"name\":{\"8\":{}},\"comment\":{}}],[\"githubfile\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"githubrepository\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"name\",{\"_index\":3,\"name\":{\"3\":{}},\"comment\":{}}],[\"owner\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"pat\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"sha\",{\"_index\":6,\"name\":{\"7\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
\ No newline at end of file
+window.searchData = JSON.parse("{\"rows\":[{\"kind\":4194304,\"name\":\"GitHubRepository\",\"url\":\"types/GitHubRepository.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GitHubRepository.html#__type\",\"classes\":\"\",\"parent\":\"GitHubRepository\"},{\"kind\":1024,\"name\":\"owner\",\"url\":\"types/GitHubRepository.html#__type.owner\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"types/GitHubRepository.html#__type.name\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":1024,\"name\":\"pat\",\"url\":\"types/GitHubRepository.html#__type.pat\",\"classes\":\"\",\"parent\":\"GitHubRepository.__type\"},{\"kind\":4194304,\"name\":\"GithubFile\",\"url\":\"types/GithubFile.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/GithubFile.html#__type\",\"classes\":\"\",\"parent\":\"GithubFile\"},{\"kind\":1024,\"name\":\"sha\",\"url\":\"types/GithubFile.html#__type.sha\",\"classes\":\"\",\"parent\":\"GithubFile.__type\"},{\"kind\":1024,\"name\":\"blob\",\"url\":\"types/GithubFile.html#__type.blob\",\"classes\":\"\",\"parent\":\"GithubFile.__type\"},{\"kind\":4194304,\"name\":\"GithubFolder\",\"url\":\"types/GithubFolder.html\",\"classes\":\"\"},{\"kind\":4194304,\"name\":\"Folder\",\"url\":\"types/Folder.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/Folder.html#__type\",\"classes\":\"\",\"parent\":\"Folder\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"types/Folder.html#__type.name\",\"classes\":\"\",\"parent\":\"Folder.__type\"},{\"kind\":1024,\"name\":\"parent\",\"url\":\"types/Folder.html#__type.parent\",\"classes\":\"\",\"parent\":\"Folder.__type\"},{\"kind\":1024,\"name\":\"files\",\"url\":\"types/Folder.html#__type.files\",\"classes\":\"\",\"parent\":\"Folder.__type\"},{\"kind\":4194304,\"name\":\"File\",\"url\":\"types/File.html\",\"classes\":\"\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"types/File.html#__type\",\"classes\":\"\",\"parent\":\"File\"},{\"kind\":1024,\"name\":\"name\",\"url\":\"types/File.html#__type.name\",\"classes\":\"\",\"parent\":\"File.__type\"},{\"kind\":1024,\"name\":\"data\",\"url\":\"types/File.html#__type.data\",\"classes\":\"\",\"parent\":\"File.__type\"},{\"kind\":64,\"name\":\"default\",\"url\":\"functions/default.html\",\"classes\":\"\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,26.391]],[\"comment/0\",[]],[\"name/1\",[1,15.404]],[\"comment/1\",[]],[\"name/2\",[2,26.391]],[\"comment/2\",[]],[\"name/3\",[3,17.918]],[\"comment/3\",[]],[\"name/4\",[4,26.391]],[\"comment/4\",[]],[\"name/5\",[5,26.391]],[\"comment/5\",[]],[\"name/6\",[1,15.404]],[\"comment/6\",[]],[\"name/7\",[6,26.391]],[\"comment/7\",[]],[\"name/8\",[7,26.391]],[\"comment/8\",[]],[\"name/9\",[8,26.391]],[\"comment/9\",[]],[\"name/10\",[9,26.391]],[\"comment/10\",[]],[\"name/11\",[1,15.404]],[\"comment/11\",[]],[\"name/12\",[3,17.918]],[\"comment/12\",[]],[\"name/13\",[10,26.391]],[\"comment/13\",[]],[\"name/14\",[11,26.391]],[\"comment/14\",[]],[\"name/15\",[12,26.391]],[\"comment/15\",[]],[\"name/16\",[1,15.404]],[\"comment/16\",[]],[\"name/17\",[3,17.918]],[\"comment/17\",[]],[\"name/18\",[13,26.391]],[\"comment/18\",[]],[\"name/19\",[14,26.391]],[\"comment/19\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":1,\"name\":{\"1\":{},\"6\":{},\"11\":{},\"16\":{}},\"comment\":{}}],[\"blob\",{\"_index\":7,\"name\":{\"8\":{}},\"comment\":{}}],[\"data\",{\"_index\":13,\"name\":{\"18\":{}},\"comment\":{}}],[\"default\",{\"_index\":14,\"name\":{\"19\":{}},\"comment\":{}}],[\"file\",{\"_index\":12,\"name\":{\"15\":{}},\"comment\":{}}],[\"files\",{\"_index\":11,\"name\":{\"14\":{}},\"comment\":{}}],[\"folder\",{\"_index\":9,\"name\":{\"10\":{}},\"comment\":{}}],[\"githubfile\",{\"_index\":5,\"name\":{\"5\":{}},\"comment\":{}}],[\"githubfolder\",{\"_index\":8,\"name\":{\"9\":{}},\"comment\":{}}],[\"githubrepository\",{\"_index\":0,\"name\":{\"0\":{}},\"comment\":{}}],[\"name\",{\"_index\":3,\"name\":{\"3\":{},\"12\":{},\"17\":{}},\"comment\":{}}],[\"owner\",{\"_index\":2,\"name\":{\"2\":{}},\"comment\":{}}],[\"parent\",{\"_index\":10,\"name\":{\"13\":{}},\"comment\":{}}],[\"pat\",{\"_index\":4,\"name\":{\"4\":{}},\"comment\":{}}],[\"sha\",{\"_index\":6,\"name\":{\"7\":{}},\"comment\":{}}]],\"pipeline\":[]}}");
\ No newline at end of file
diff --git a/functions/default.html b/functions/default.html
index e61ab18..0d404ae 100644
--- a/functions/default.html
+++ b/functions/default.html
@@ -17,13 +17,14 @@
The absolute path that locates the file in the repository.
+
The absolute path that locates the file in the repository. If a folder is to be upserted, then the path indicates the root
+directory where the folder will be inserted.
-
Optionalref: string
-
An (optional) git commit ref/branch in which the file should be upserted.
To use this package, you will need a Personal Access Token (PAT) with read/write permissions for the repository you want to upload files in. Create one by going to: Settings > Developer Settings > Personal Access Tokens.
// You can grab your personal access token in: Settings > Developer Settings > Personal Access Tokens constrepo = <GitHubRepository>{ name:'your-github-repo', owner:'your-github-username', pat:'your-github-pat' };
// You can grab your personal access token in: Settings > Developer Settings > Personal Access Tokens constrepo = <GitHubRepository>{ name:'your-github-repo', owner:'your-github-username', pat:'your-github-pat' };
+
\ No newline at end of file
diff --git a/types/GitHubRepository.html b/types/GitHubRepository.html
index 464f50f..c2dce85 100644
--- a/types/GitHubRepository.html
+++ b/types/GitHubRepository.html
@@ -26,7 +26,7 @@
Upserts a file on a GitHub repository using GitHub HTTP API. This function performs two HTTP requests:
+Upserts a file or folder on a GitHub repository using GitHub HTTP API. This function performs two HTTP requests:
Note: If a folder is to be upserted, the number of requests is multiplied by the number of files and child folders!
Parameters
@@ -33,22 +34,21 @@repo:
A GitHubRepository model that identifies the repository file will be upserted.
data: Uint8Array
-The file content to be upserted, encoded at the byte level.
+file: Folder | File
+The file or folder to be upserted.
path: string
-The absolute path that locates the file in the repository.
+The absolute path that locates the file in the repository. If a folder is to be upserted, then the path indicates the root +directory where the folder will be inserted.
-Optional
ref: stringAn (optional) git commit ref/branch in which the file should be upserted.
-Returns Promise<GithubFile | undefined>
A GithubFile model that identifies the file within GitHub API, or a Response instance +
__namedParameters: OptionalUpsertParameters = {}
Returns Promise<GithubFile | GithubFolder | undefined>
A GithubFile model that identifies the file within GitHub API, or a Response instance if the fetch/upsert request failed.