MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / FSStream

Method FSStream

3ds/source/fsstream.cpp:33–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31static const u32 pxi_path[5] = {1, 1, 3, 0, 0};
32
33FSStream::FSStream(FS_Archive archive, const std::u16string& path, u32 flags)
34{
35 mGood = false;
36 mSize = 0;
37 mOffset = 0;
38 // Default to a zeroed FS handle so a failed open leaves mHandle valid (and
39 // isPxi() false) instead of the variant's default-constructed FSPXI_File.
40 mHandle = (Handle)0;
41 Handle hnd = 0;
42
43 mResult = FSUSER_OpenFile(&hnd, archive, fsMakePath(PATH_UTF16, path.data()), flags, 0);
44 if (R_SUCCEEDED(mResult)) {
45 u64 size64 = 0;
46 FSFILE_GetSize(hnd, &size64);
47 mSize = (u32)size64;
48 mHandle = hnd;
49 mGood = true;
50 }
51}
52
53FSStream::FSStream(FS_Archive archive, const std::u16string& path, u32 flags, u32 size)
54{

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected