Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

FileStat missing #58

Closed
dokterbob opened this issue Mar 20, 2020 · 3 comments
Closed

FileStat missing #58

dokterbob opened this issue Mar 20, 2020 · 3 comments

Comments

@dokterbob
Copy link

type FileStat struct {
    Cid cid.Cid
    Blocks int
    Size int
    CumulativeSize int
    Type FileType
}

As return value for proposed UnixFs.Stat(), see: ipfs/go-ipfs-http-client#78

@Stebalien
Copy link
Member

This is currently the case because there is no "ipfs stat" command and we haven't implemented the ipfs files API (#54).

However, we should probably just go ahead and expose that on the CoreAPI. However, I'd return the following:

type FileStat struct {
    Cid cid.Cid
    Size int // File size, if known. Otherwise -1.
    Type FileType
    Mode os.FileMode // coming in unixfsv1.5
    ModTime time.Time // coming in unixfsv1.5
}

Explicitly dropping things directly related to the underlying structure (non-cumulative size & number of direct children)

@dokterbob
Copy link
Author

UnixFS 1.5!? What about 2? Is it finally coming? I'm getting worried. ;)

@lidel
Copy link
Member

lidel commented Jun 19, 2023

This repository is no longer maintained and has been copied over to boxo/coreiface and kubo/client/rpc.

In an effort to avoid noise and crippling in the Boxo repo from the weight of issues of the past, we are closing most issues and PRs in this repo.

Please feel free to open a new issue in Boxo/Kubo (and reference this issue) – see #55 (comment).

You can learn more in the FAQs for the Boxo repo copying/consolidation effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants