You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
* Adding option for dotfiles in addFromFs.
* Adding changes for code review.
* Changed `dot` option to `hidden` to match go-ipfs
* Asserted hidden file hash in test for safety
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,7 +150,10 @@ Complete documentation for these methods is coming with: https://github.com/ipfs
150
150
151
151
> `ipfs.util.addFromFs(path, option, callback)`
152
152
153
-
Reads a file from `path` on the filesystem and adds it to IPFS. If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories. To exclude fileglobs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.
153
+
Reads a file or folder from `path` on the filesystem and adds it to IPFS. Options:
154
+
-**recursive**: If `path` is a directory, use option `{ recursive: true }` to add the directory and all its sub-directories.
155
+
-**ignore**: To exclude fileglobs from the directory, use option `{ ignore: ['ignore/this/folder/**', 'and/this/file'] }`.
156
+
-**hidden**: hidden/dot files (files or folders starting with a `.`, for example, `.git/`) are not included by default. To add them, use the option `{ hidden: true }`.
0 commit comments