mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 09:52:28 +00:00
feat(profile): add more filesystem API stuff
This commit is contained in:
parent
fb267a5683
commit
3cd843a220
20 changed files with 494 additions and 163 deletions
|
|
@ -11,11 +11,11 @@ struct Blizzard__File__FileInfo {
|
|||
// uint32_t unk08;
|
||||
// uint32_t unk0C;
|
||||
uint64_t size; // 08
|
||||
uint32_t attributes;
|
||||
Blizzard__Time__Timestamp creationTime;
|
||||
Blizzard__Time__Timestamp lastWriteTime;
|
||||
Blizzard__Time__Timestamp lastAccessTime;
|
||||
int32_t exists;
|
||||
int32_t attributes;
|
||||
Blizzard__Time__Timestamp createtime;
|
||||
Blizzard__Time__Timestamp lastwritetime;
|
||||
Blizzard__Time__Timestamp lastaccesstime;
|
||||
int32_t filetype;
|
||||
int32_t normal;
|
||||
};
|
||||
|
||||
|
|
|
|||
20
profile/3.3.5a-windows-386/include/bc/file/mode.h
Normal file
20
profile/3.3.5a-windows-386/include/bc/file/mode.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef BC_FILE_MODE_H
|
||||
#define BC_FILE_MODE_H
|
||||
|
||||
DECLARE_ENUM(Blizzard__File__Mode);
|
||||
|
||||
enum Blizzard__File__Mode {
|
||||
read = 0x0001,
|
||||
write = 0x0002,
|
||||
shareread = 0x0004,
|
||||
sharewrite = 0x0008,
|
||||
nocache = 0x0040,
|
||||
temporary = 0x0080,
|
||||
truncate = 0x0100,
|
||||
append = 0x0200,
|
||||
create = 0x0400,
|
||||
mustnotexist = 0x0800,
|
||||
mustexist = 0x1000
|
||||
};
|
||||
|
||||
#endif
|
||||
11
profile/3.3.5a-windows-386/include/bc/file/removedirectory.h
Normal file
11
profile/3.3.5a-windows-386/include/bc/file/removedirectory.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef BC_FILE_REMOVE_DIRECTORY_H
|
||||
#define BC_FILE_REMOVE_DIRECTORY_H
|
||||
|
||||
DECLARE_STRUCT(Blizzard__File__RemoveDirectoryAndContents__Internal__RemoveDirectoryAndContentsParms);
|
||||
|
||||
struct Blizzard__File__RemoveDirectoryAndContents__Internal__RemoveDirectoryRecurseData {
|
||||
bool unk00;
|
||||
bool unk01; // set normal?
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -7,10 +7,11 @@ DECLARE_STRUCT(Blizzard__File__StreamRecord);
|
|||
|
||||
struct Blizzard__File__StreamRecord {
|
||||
void* filehandle;
|
||||
uint32_t flags;
|
||||
int32_t mode;
|
||||
bool haveinfo;
|
||||
uint32_t unk0C;
|
||||
Blizzard__File__FileInfo info;
|
||||
// GetFileInfo only gets a size if this is null or points to a zero value
|
||||
int32_t* unk48;
|
||||
char* name; // name is a pointer to &filehandle (0x00) + sizeof(StreamRecord)
|
||||
// extra buffer that holds the actual data of name
|
||||
|
|
|
|||
14
profile/3.3.5a-windows-386/include/bc/main.h
Normal file
14
profile/3.3.5a-windows-386/include/bc/main.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef BC_MAIN_H
|
||||
#define BC_MAIN_H
|
||||
|
||||
#include "bc/file/filesystem.h"
|
||||
#include "bc/file/stream.h"
|
||||
#include "bc/file/processdir.h"
|
||||
#include "bc/lock/do_once.h"
|
||||
#include "bc/string/quicknativepath.h"
|
||||
#include "bc/systemfile/stacked.h"
|
||||
#include "bc/os/file.h"
|
||||
#include "bc/os/file_data.h"
|
||||
#include "bc/time/timestamp.h"
|
||||
|
||||
#endif
|
||||
12
profile/3.3.5a-windows-386/include/bc/os/file.h
Normal file
12
profile/3.3.5a-windows-386/include/bc/os/file.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef BC_OS_FILE_H
|
||||
#define BC_OS_FILE_H
|
||||
|
||||
DECLARE_STRUCT(HOSFILE__);
|
||||
|
||||
struct HOSFILE__ {
|
||||
int32_t unused__;
|
||||
};
|
||||
|
||||
typedef HOSFILE__* HOSFILE;
|
||||
|
||||
#endif
|
||||
20
profile/3.3.5a-windows-386/include/bc/os/file_data.h
Normal file
20
profile/3.3.5a-windows-386/include/bc/os/file_data.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef BC_OS_FILE_DATA_H
|
||||
#define BC_OS_FILE_DATA_H
|
||||
|
||||
DECLARE_STRUCT(OS_FILE_DATA);
|
||||
DECLARE_STRUCT(FileListParms);
|
||||
|
||||
struct OS_FILE_DATA {
|
||||
uint32_t size;
|
||||
uint32_t flags;
|
||||
char fileName[260];
|
||||
};
|
||||
|
||||
struct OsFileList__Internal__FileListParms {
|
||||
void* callback;
|
||||
void* param;
|
||||
uint32_t flags;
|
||||
char* pattern;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef BC_OS_FILE_H
|
||||
#define BC_OS_FILE_H
|
||||
|
||||
#include "common/handle.h"
|
||||
|
||||
DECLARE_HANDLE(HOSFILE);
|
||||
|
||||
#endif
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
#include "bc/file/stream.h"
|
||||
#include "bc/file/info.h"
|
||||
#include "bc/file/processdir.h"
|
||||
#include "bc/file/mode.h"
|
||||
|
||||
DECLARE_STRUCT(System_File__Stacked__FileParms);
|
||||
|
||||
|
|
@ -17,19 +18,31 @@ struct System_File__Stacked__FileParms {
|
|||
char* newname; // 0x8
|
||||
Blizzard__File__StreamRecord* file; // 0xC
|
||||
Blizzard__File__FileInfo* info;
|
||||
uint32_t extra[17]; // 0x10
|
||||
uint32_t flags;
|
||||
uint32_t extra;
|
||||
Blizzard__File__FileInfo noinfo;
|
||||
uint32_t setinfo;
|
||||
// something to do with file info
|
||||
// used by:
|
||||
// Blizzard::File::GetFileInfo
|
||||
// set to -1
|
||||
uint32_t getinfo;
|
||||
Blizzard__File__Mode mode; // 0x58
|
||||
void* data; //
|
||||
uint32_t count;
|
||||
int64_t offset;
|
||||
uint32_t unk__;
|
||||
int32_t whence;
|
||||
char* buffer;
|
||||
int32_t buffersize;
|
||||
bool unkbool1;
|
||||
bool unkbool2;
|
||||
bool recurse;
|
||||
// something to do with MakeAbsolutePath? (normalize? resolve? resolvesymlinks?)
|
||||
bool canonicalize;
|
||||
void* dirwalkparam;
|
||||
Blizzard__File__ProcessDirCallback dirwalkcallback;
|
||||
uint32_t extra3[2];
|
||||
// set to false by Blizzard::File::ProcessDirFast
|
||||
bool unk88;
|
||||
bool overwrite;
|
||||
bool set_acl; // something that causes a security descriptor to be generated in mkdir() (takeownership? chown? )
|
||||
uint32_t unk8C;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,14 +13,7 @@
|
|||
#include "async/object.h"
|
||||
#include "async/queue.h"
|
||||
|
||||
#include "bc/file/filesystem.h"
|
||||
#include "bc/file/stream.h"
|
||||
#include "bc/file/processdir.h"
|
||||
#include "bc/lock/do_once.h"
|
||||
#include "bc/string/quicknativepath.h"
|
||||
#include "bc/systemfile/stacked.h"
|
||||
#include "bc/osfile.h"
|
||||
#include "bc/time/timestamp.h"
|
||||
#include "bc/main.h"
|
||||
|
||||
#include "camera/camera.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue