Trade-offs and warnings
Consult the linked header for this operation’s ownership, lifetime and failure behavior.
PSYQO SDK
Method · 1 overload
Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.
Creates or overwrites a file.
void writeFile(Port port, const char *name, const char *title, const Icon &icon, const void *data, uint32_t dataLen, eastl::function<void(Error)> &&callback)Creates or overwrites a file.
| Parameter | Type | Meaning |
|---|---|---|
port | Port | Not documented; consult the linked header. |
name | const char * | The Sony filename (up to 20 characters). The pointer must stay valid until the callback fires. |
title | const char * | The save title, as a UTF-8 string, encoded to the 64-byte Shift-JIS field the BIOS manager displays, with printable ASCII promoted to its fullwidth form. Must stay valid until the callback fires. |
icon | const Icon & | The save icon. Copied, so it need not outlive the call. |
data | const void * | The payload bytes. Must stay valid until the callback fires. |
dataLen | uint32_t | The number of payload bytes. |
callback | eastl::function<void (Error)> && | Not documented; consult the linked header. |
Returns: Nothing (void).
#include "psyqo/memory-card-filesystem.hh"
// Assume these named values have been initialized with valid data:
// Port port
// const char * name
// const char * title
// const Icon & icon
// const void * data
// uint32_t dataLen
// eastl::function<void (Error)> && callback
psyqo::MemoryCardFileSystem& object = /* obtain a valid instance */;
object.writeFile(port, name, title, icon, data, dataLen, callback);Consult the linked header for this operation’s ownership, lifetime and failure behavior.
deleteFileDeletes a file, freeing all of its blocks.MethoddeleteFileBlockingPerforms `delete file blocking` as part of asynchronous Memory Card access and files.MethodfileExistsReports whether a named file exists, into *outExists.MethodfileExistsBlockingPerforms `file exists blocking` as part of asynchronous Memory Card access and files.MethodformatWrites a fresh, empty Sony filesystem to the card.MethodformatBlockingPerforms `format blocking` as part of asynchronous Memory Card access and files.MethodgetCardStateDetermines whether a usable, formatted card is present.MethodgetCardStateBlocking-- Blocking variants -------------------------------------------------- These run the same transaction but pump the GPU until it finishes and return the error directly.MethodgetFreeBlockCountCounts the free 8KiB blocks (0..15) into *outFreeBlocks.MethodgetFreeBlockCountBlockingReturns free block count blocking as part of asynchronous Memory Card access and files.MethodisIdleWhether the filesystem is ready to accept a new operation.MethodlistFilesLists the files on the card.Method