ipfs_client_flutter 1.0.7 copy "ipfs_client_flutter: ^1.0.7" to clipboard
ipfs_client_flutter: ^1.0.7 copied to clipboard

A flutter client library for the InterPlanetary File System (IPFS) HTTP API.

A flutter client library for the IPFS HTTP API.

Features #

  • Make a directory
  • List all directories/files in a directory/subdirectory
  • File status
  • Write a file
  • Read a file
  • Remove a file/directory
  • Move/Rename a file

Usage #

  IpfsClient ipfsClient = IpfsClient();
copied to clipboard

OR

  IpfsClient ipfsClient = IpfsClient(url: "http://127.0.0.1:5001");
  // default is http://127.0.0.1:5001 so you don't need to pass url in case you are working on localhost
copied to clipboard

If your app uses Basic Authorization then,

  IpfsClient ipfsClient =
      IpfsClient(url: "YOUR_SERVER_URL", authorizationToken: "YOUR_TOKEN");
copied to clipboard

How to make a directory in IPFS #

  var response = await ipfsClient.mkdir(dir: 'myfolder');
copied to clipboard

Get list of directories/files in a directory/subdirectory in the local mutable namespace. #

  var response = await ipfsClient.ls(dir: 'myfolder');
copied to clipboard

If you dont pass any folder it will return all files and directories of root directory.

How to Write to a file #

    var response = await ipfsClient.write(
      dir: 'myfolder/sample.png',
      filePath: "/Users/myuser/Desktop/sample.png",
      fileName: "sample.png");
copied to clipboard

How to read a file #

  var response = await ipfsClient.read(dir: "myfolder/sample.png");
copied to clipboard

How to remove a file #

  var response = await ipfsClient.remove(dir: "myfolder/sample.png");
copied to clipboard

How to move/rename a file #

  var response = await ipfsClient.mv(oldPath: "myfolder/sample.png", newPath: "myfolder/MY_SAMPLE.png");
copied to clipboard
16
likes
150
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.26 - 2025.04.10

A flutter client library for the InterPlanetary File System (IPFS) HTTP API.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

dio

More

Packages that depend on ipfs_client_flutter