IpfsPlatform class abstract

Abstract class representing platform-specific operations.

These methods are implemented differently across platforms (VM vs Web) to provide a unified API for file system and system operations.

Constructors

IpfsPlatform()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isIO → bool
Whether the current platform is Desktop/Mobile (supports dart:io).
no setter
isWeb → bool
Whether the current platform is Web.
no setter
operatingSystem → String
Returns the name of the operating system.
no setter
pathSeparator → String
Helper to get the path separator for the platform.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → String
Returns the version of the platform/runtime.
no setter

Methods

createDirectory(String path) → Future<void>
Returns a Future that completes when a directory is created at path.
createTempDirectory([String? prefix]) → Future<String>
Returns a Future that resolves to the path of a newly created temporary directory with an optional prefix.
delete(String path) → Future<void>
Returns a Future that completes when a file or directory at path is deleted.
exists(String path) → Future<bool>
Returns a Future that resolves to true if a file or directory exists at path.
getLength(String path) → Future<int>
Returns a Future that resolves to the size of a file at path in bytes.
listDirectory(String path) → Future<List<String>>
Returns a Future that resolves to a List of filenames/paths in the directory at path.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
promptPassword(String message) → Future<String?>
Returns a Future that resolves to a password entered by the user.
readBytes(String path) → Future<Uint8List?>
Returns a Future that resolves to the Uint8List bytes from a file at path, or null if the file does not exist.
readString(String path) → Future<String?>
Returns a Future that resolves to the string content from a file at path, or null if the file does not exist.
restrictToOwner(String path) → Future<void>
Best-effort restriction of a file at path so only the owner can read or write it (POSIX 0600).
toString() → String
A string representation of this object.
inherited
writeBytes(String path, Uint8List bytes) → Future<void>
Returns a Future that completes when bytes are written to a file at path.
writeString(String path, String content) → Future<void>
Returns a Future that completes when content is written to a file at path.
writeStringRestricted(String path, String content) → Future<void>
Writes content to path with owner-only permissions applied before any secret bytes reach disk.

Operators

operator ==(Object other) → bool
The equality operator.
inherited