Skip to content

Add Support for Path Names in Filenames with Recursive Directory Creation #106

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

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

Conversation

Dr1zz3l
Copy link

@Dr1zz3l Dr1zz3l commented Mar 21, 2025

Description:

This edit allows the user to specify path names in filenames. If the specified directories do not exist, they are created recursively to ensure the file can be saved as intended.

Changes Made:

  • Extended src/main.ts to check for missing directories in the specified path.
  • Implemented automatic recursive directory creation for saving files in non-existent paths.
  • Added an example to src/main.ts.

Testing:

  • Verified file creation in both existing and non-existent directory structures.
  • Tested with various path depths.

Why This is Needed:

When the user pastes an image, it gets stored at the root directory. Since this is usually not wanted, it needs to be moved to the desired directory manually.

Disclaimer:

This is my first pull request to a foreign GitHub repo ever and I'm new to TypeScript. If I made any mistakes, please tell me how to do better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant