mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
|
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Check / lint (push) Has been cancelled
Docker Check / build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / unit-tests (push) Has been cancelled
Go Test / cli-tests (push) Has been cancelled
Go Test / example-tests (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
* Implements the -l/--long flag for the ipfs ls command to display Unix-style file permissions and modification times, similar to the traditional ls -l. When the --long flag is used, the output includes: - File mode/permissions in Unix format (e.g., -rw-r--r--, drwxr-xr-x) - File hash (CID) - File size (when --size is also specified) - Modification time in human-readable format - File name The permission string implementation handles all file types and special bits: - File types: regular (-), directory (d), symlink (l), named pipe (p), socket (s), character device (c), block device (b) - Special permission bits: setuid (s/S), setgid (s/S), sticky (t/T) - Lowercase when execute bit is set, uppercase when not set The timestamp format follows Unix ls conventions: - Recent files (within 6 months): "Jan 02 15:04" - Older files: "Jan 02 2006" Signed-off-by: sneax <paladesh600@gmail.com> * fix(ls): correct --long flag header order and help text - fix header column order: was "Mode Hash Size Name ModTime" but data outputs "Mode Hash Size ModTime Name", now headers match data order - remove redundant if/else branch in directory output that had identical code in both branches - add example output to help text showing format with mode, hash, size, mtime, and name columns - document that files without preserved metadata show '----------' for mode and '-' for mtime - add changelog entry for v0.40 * test(ls): add format stability tests for --long flag add tests to prevent formatting regressions in ipfs ls --long output: unit tests (core/commands/ls_test.go): - TestFormatMode: 20 cases covering all file types (regular, dir, symlink, pipe, socket, block/char devices) and special permission bits (setuid, setgid, sticky with/without execute) - TestFormatModTime: zero time, old time (year format), future time, format length consistency integration tests (test/cli/ls_test.go): - explicit full output comparison with deterministic CIDs to catch any formatting changes - header column order verification for --long with --size=true/false - files without preserved metadata (---------- and - placeholders) - directory output (trailing slash, d prefix in mode) requested in: https://github.com/ipfs/kubo/pull/11103#issuecomment-3745043561 * fix(ls): improve --long flag docs and fix minor issues - improved godocs for formatMode and formatModTime functions - fixed permBit signature: char rune → char byte (avoids unnecessary cast) - clarified help text: mode/mtime are optional UnixFS metadata - documented that times are displayed in UTC - fixed flaky time test by using 1 month ago instead of 1 hour - removed hardcoded CID assertion that would break on DAG changes * fix(ls): show "-" for missing mode in --long output display "-" instead of "----------" when mode metadata is not preserved. this avoids ambiguity with Unix mode 0000 and matches how missing mtime is already displayed. follows common Unix tool conventions (ps, netstat) where "-" indicates "not available". --------- Signed-off-by: sneax <paladesh600@gmail.com> Co-authored-by: Marcin Rataj <lidel@lidel.org> |
||
|---|---|---|
| .. | ||
| changelogs | ||
| examples | ||
| logo | ||
| production | ||
| specifications | ||
| add-code-flow.md | ||
| AUTHORS | ||
| cli-http-api-core-diagram.png | ||
| command-completion.md | ||
| config.md | ||
| content-blocking.md | ||
| customizing.md | ||
| datastores.md | ||
| debug-guide.md | ||
| delegated-routing.md | ||
| developer-certificate-of-origin | ||
| developer-guide.md | ||
| EARLY_TESTERS.md | ||
| environment-variables.md | ||
| experimental-features.md | ||
| file-transfer.md | ||
| fuse.md | ||
| gateway.md | ||
| generate-authors.sh | ||
| http-rpc-clients.md | ||
| implement-api-bindings.md | ||
| libp2p-resource-management.md | ||
| metrics.md | ||
| p2p-tunnels.md | ||
| plugins.md | ||
| provide-stats.md | ||
| README.md | ||
| RELEASE_CHECKLIST.md | ||
| RELEASE_ISSUE_TEMPLATE.md | ||
| releases_thunderdome.md | ||
| releases.md | ||
| telemetry.md | ||
| transports.md | ||
| windows.md | ||
Developer Documentation and Guides
If you are looking for User Documentation & Guides, please visit docs.ipfs.tech or check General Documentation.
If you’re experiencing an issue with IPFS, please follow our issue guide when filing an issue!
Otherwise, check out the following guides to using and developing IPFS:
General Documentation
Developing kubo
- Developer Guide - prerequisites, build, test, and contribute
- Contributing Guidelines for IPFS projects and for Go code specifically
- Building on Windows
- Performance Debugging Guidelines
- Release Checklist
Guides
- How to Implement an API Client
- Connecting with Websockets — if you want
js-ipfsnodes in web browsers to connect to yourkubonode, you will need to turn on websocket support in yourkubonode.
Advanced User Guides
- Transferring a File Over IPFS
- Installing command completion
- Mounting IPFS with FUSE
- Installing plugins
- Setting up an IPFS Gateway
Other
- Thanks to all our contributors ❤️ (We use the
generate-authors.shscript to regenerate this list.) - How to file a GitHub Issue