npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

recursive-file-remover

v1.0.1

Published

Un package npm pour supprimer récursivement des fichiers à partir d'un répertoire et de ses sous-répertoires.

Downloads

5

Readme

Démarrage rapide

La bibliothèque remove-file-recursive vous permet de supprimer des fichiers et des répertoires de manière récursive.

Installation

Pour installer la bibliothèque, exécutez la commande suivante : npm install remove-file-recursive

Utilisation

Pour utiliser la bibliothèque, importez la fonction removeFilesRecursive() dans votre code :

import { removeFilesRecursive } from "remove-file-recursive";


Ensuite, appelez la fonction `removeFilesRecursive()` avec le chemin du répertoire que vous souhaitez supprimer :

typescript
removeFilesRecursive("/path/to/directory");


Cette fonction supprimera tous les fichiers et répertoires de manière récursive à partir du chemin spécifié.

## Options

La fonction `removeFilesRecursive()` prend les options suivantes :

* **preview**: Si `true`, la fonction liste les fichiers et répertoires qui seront supprimés, mais ne les supprime pas réellement.
* **verbose**: Si `true`, la fonction imprime des informations détaillées sur le processus de suppression.
* **extensions**: Un tableau d'extensions de fichiers à supprimer.
* **sizes**: Un tableau de plages de tailles à supprimer.
* **onEnd**: Une fonction qui sera appelée lorsque le processus de suppression est terminé.
* **cancelable**: Si `true`, le processus de suppression peut être annulé en appelant la fonction `cancel()`.
* **output**: Une fonction qui sera appelée pour chaque fichier ou répertoire supprimé. La fonction recevra le chemin du fichier ou du répertoire.
* **exportFormat**: Le format à utiliser pour exporter les fichiers et répertoires supprimés.

## Exemples

Voici quelques exemples d'utilisation de la bibliothèque `remove-file-recursive`:

**Pour supprimer un répertoire et tous ses sous-répertoires et fichiers**

typescript
import { removeFilesRecursive } from "recursive-file-remover";

removeFilesRecursive("/path/to/directory");

**Pour supprimer un fichier spécifique **

import { removeFilesRecursive } from "remove-file-recursive";

removeFilesRecursive("/path/to/file");

## Tests

To run the tests, run the following command:


npm test


## Documentation

The documentation is available in the docs: docs directory.

## Support

If you have any questions or problems, please feel free to open an issue on GitHub.

## Contributing

Contributions are welcome! Please see the contributing: CONTRIBUTING.md guide for more information.


I hope this is helpful!


# delete-recursive

A library for recursively deleting files and directories.