Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit f4e2ec5

Browse files
author
Alan Shaw
committed
feat: metadata for ipfs.get
1 parent bd89bb0 commit f4e2ec5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/http/api/resources/files-regular.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ exports.get = {
9595
async function * (source) {
9696
for await (const file of source) {
9797
const header = {
98-
name: file.path
98+
name: file.path,
99+
mtime: file.mtime ? new Date(file.mtime.secs * 1000) : null,
100+
mode: file.mode
99101
}
100102

101103
if (file.content) {

0 commit comments

Comments
 (0)