This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace readme with deprecation notice * Add pursuit keyword
- Loading branch information
1 parent
5ed121e
commit eabddfb
Showing
2 changed files
with
5 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
# purescript-node-fs-aff | ||
# DEPRECATED | ||
|
||
[![Latest release](http://img.shields.io/github/release/purescript-node/purescript-node-fs-aff.svg)](https://github.com/purescript-node/purescript-node-fs-aff/releases) | ||
[![Build status](https://github.com/purescript-node/purescript-node-fs-aff/workflows/CI/badge.svg?branch=master)](https://github.com/purescript-node/purescript-node-fs-aff/actions?query=workflow%3ACI+branch%3Amaster) | ||
[![Pursuit](https://pursuit.purescript.org/packages/purescript-node-fs-aff/badge)](https://pursuit.purescript.org/packages/purescript-node-fs-aff) | ||
`purescript-node-fs-aff` is deprecated. Functions and values from this library were merged as-is into the [`purescript-node-fs`](https://github.com/purescript/purescript-node-fs) library. | ||
|
||
[Node.FS][node.fs] wrappers for [purescript-aff][aff]. | ||
The [original releases up to v9.2.0](https://github.com/purescript-deprecated/purescript-node-fs-aff/releases) of this library are still available and will work with compiler versions prior to PureScript v0.16.x. | ||
|
||
The `Aff` monad lets you write async code with ease, and `node-fs-aff` lets you easily access the filesystem within `Aff`. | ||
|
||
## Installation | ||
|
||
``` | ||
spago install node-fs-aff | ||
``` | ||
|
||
## Example | ||
|
||
Consider asynchronously listing only non-hidden directories: | ||
|
||
```purescript | ||
main = launchAff do | ||
files <- FS.readdir "." | ||
files' <- flip filterM files \file -> do | ||
stat <- FS.stat file | ||
pure $ | ||
FS.isDirectory stat | ||
&& (maybe false (fromChar >>> (/= ".")) $ charAt 0 file) | ||
liftEff $ print files' | ||
``` | ||
|
||
That was easy. Run `npm run example` to see it work. | ||
|
||
## Documentation | ||
|
||
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-node-fs-aff). | ||
|
||
[node.fs]: http://github.com/purescript-node/purescript-node-fs | ||
[aff]: https://github.com/slamdata/purescript-aff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters