Skip to content

Commit

Permalink
updated code
Browse files Browse the repository at this point in the history
  • Loading branch information
pontiyaraja committed Nov 5, 2019
1 parent 1a42dee commit f7f27df
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 910 deletions.
11 changes: 8 additions & 3 deletions core/commands/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (

var addlog = logging.Logger("cmds/add")

//var flog = logging.Logger("cmds/files")

// ErrDepthLimitExceeded indicates that the max depth has been exceeded.
var ErrDepthLimitExceeded = fmt.Errorf("depth limit exceeded")

Expand Down Expand Up @@ -220,19 +222,22 @@ You can now check what blocks have been created by:
}

opts = append(opts, nil) // events option placeholder

addlog.Debug(" IN ADD ================================================= PANDIYAAaaaaaaaaaa")
var added int
addit := toadd.Entries()
for addit.Next() {
_, dir := addit.Node().(files.Directory)
errCh := make(chan error, 1)
events := make(chan interface{}, adderOutChanSize)
opts[len(opts)-1] = options.Unixfs.Events(events)

go func() {
var err error
defer close(events)
_, err = api.Unixfs().Add(req.Context, addit.Node(), opts...)
datap, err := api.Unixfs().Add(req.Context, addit.Node(), opts...)
addlog.Info("Pontiya ROOT $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", datap.Root().String())
addlog.Info("Pontiya CID $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", datap.Cid().String())
addlog.Info("Pontiya REMAINDER $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", datap.Remainder())
//addlog.Info("Pontiya PATH $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", datap.Path)
errCh <- err
}()

Expand Down
8 changes: 4 additions & 4 deletions core/commands/cat.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/ipfs/go-ipfs/core/commands/cmdenv"

"github.com/ipfs/go-ipfs-cmds"
"github.com/ipfs/go-ipfs-files"
"github.com/ipfs/interface-go-ipfs-core"
cmds "github.com/ipfs/go-ipfs-cmds"
files "github.com/ipfs/go-ipfs-files"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/path"
)

Expand Down Expand Up @@ -57,7 +57,7 @@ var CatCmd = &cmds.Command{
if err != nil {
return err
}

log.Info("IPFS CAT PATH ================== ", req.Arguments)
readers, length, err := cat(req.Context, api, req.Arguments, int64(offset), int64(max))
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
bserv "github.com/ipfs/go-blockservice"
bstore "github.com/ipfs/go-ipfs-blockstore"
exchange "github.com/ipfs/go-ipfs-exchange-interface"
"github.com/ipfs/go-ipfs-provider"
provider "github.com/ipfs/go-ipfs-provider"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
mfs "github.com/ipfs/go-mfs"
Expand Down
113 changes: 0 additions & 113 deletions go.mod

This file was deleted.

Loading

0 comments on commit f7f27df

Please sign in to comment.