mittwald icon

mittwald

Interact with mittwald mStudio API

Actions409

Overview

This node operation, Project File System Get Directories, allows users to list directories and files within a specified project’s file system. It is useful for scenarios where you need to explore or manage the directory structure of a project remotely via API calls. For example, it can be used to retrieve all subdirectories starting from a given path, filter files by name patterns, or limit the depth of recursive directory listing.

Practical examples include:

  • Fetching all directories under a project root to display in a UI.
  • Searching for specific files matching a pattern (e.g., "*.js") within a project.
  • Retrieving only executable files or including hidden files based on user preferences.

Properties

Name Meaning
Project Id ID of the Project to list the directories for.
Directory The directory path to start listing subdirectories from.
Name Search filter for specific filenames; supports glob expressions (e.g., "*.txt").
Max Depth The nesting depth for recursively listing directory contents; 0 means no recursion.
Type Restrict results to items of type "file" or "directory". Can specify multiple types.
Executable Boolean flag to constrain search results to executable files only.
Hidden Boolean flag to include hidden files (those with a dot prefix) in the search results.

Output

The output JSON contains the list of directories and/or files matching the query parameters. Each item typically includes metadata such as name, path, type (file or directory), and possibly attributes like executability or hidden status.

If binary data were involved (not indicated here), it would represent file contents or similar, but this operation focuses on directory listings only.

Dependencies

  • Requires an API key credential for authentication to the mittwald mStudio API.
  • The node uses the mittwald mStudio API endpoint at https://api.mittwald.de.
  • No additional external dependencies are indicated beyond the API access.

Troubleshooting

  • Invalid Project Id: If the provided project ID does not exist or is incorrect, the API will likely return an error. Verify the project ID before running.
  • Permission Denied: Ensure the API key has sufficient permissions to access the project file system.
  • Empty Results: If no directories or files are returned, check the directory path, name filters, and max depth settings.
  • Incorrect Type Filter: Specifying an unsupported type or empty array may result in no matches.
  • API Connectivity Issues: Network problems or incorrect base URL configuration can cause failures.

Links and References

Discussion