Menu
Docs
Feedback
Login
You are viewing a section of Superface that will be
deprecated in Q4 2023
. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit
superface.ai/docs/migrate
.
Repository Files
vcs/repository-files@1.0.0
1 provider
List Files in Directory
ListDirectory
List files in a repository on the provided path
Input
Repository
Repository Owner
Directory Path
Reference (branch)
Page
Result
entries
Next page
Integrate
1.
Choose a provider
Mock implementation
github
Request a missing provider
2.
Use
ListDirectory
with
mock
in your code
Below instructions are for our Node.js SDK.
Use OneService for other languages.
npm
i
@superfaceai/one-sdk
Copy
Copied!
Copy
Copied!
Structure details
Input (object)
repository
required
Repository name or identifier, e.g.: `octocat/hello-worId` (without `owner`), or `hello-worId` (if `owner` is set).
string
owner
optional
Username of the account owning the repository. Optional if provided in `repository`.
string
path
optional
Path to the directory for listing. Defaults to the root directory (`/`).
string
reference
optional
Branch name or commit reference. Defaults to the default branch for the repository (e.g. `main` or `master`).
string
page
optional
For entries pagination, use value from `nextPage`.
string
Example
Copy
Copied!
Result (object)
entries
optional
list
name
required
File name
string
path
required
File path
string
type
required
Whether the entry is a directory or a file
enum
file
directory
symlink
size
optional
Empty for directories.
number
rawUrl
optional
Empty for directories.
string
nextPage
optional
For paginating entries. Pass to `page` parameter.
string
Example
Copy
Copied!
Implementation details
Provider
mock
Use case
ListDirectory
Author
@superface
Source
View source
Verified