Add usage comment, sysver check

This commit is contained in:
Michael Scire 2018-11-09 09:24:42 -08:00
parent 79e6334c8d
commit 0d0c080908
2 changed files with 7 additions and 1 deletions

View File

@ -203,9 +203,12 @@ Result fsFsGetFreeSpace(FsFileSystem* fs, const char* path, u64* out);
Result fsFsGetTotalSpace(FsFileSystem* fs, const char* path, u64* out);
Result fsFsCleanDirectoryRecursively(FsFileSystem* fs, const char* path);
Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *in, size_t in_size, const char* path, FsFileSystemQueryType query_type);
Result fsFsSetArchiveBit(FsFileSystem* fs, const char *path);
void fsFsClose(FsFileSystem* fs);
/// Uses fsFsQueryEntry to set the archive bit on the specified absolute directory path.
/// This will cause HOS to treat the directory as though it is a file containing the directory's concatenated contents.
Result fsFsSetArchiveBit(FsFileSystem* fs, const char *path);
// IFile
Result fsFileRead(FsFile* f, u64 off, void* buf, size_t len, size_t* out);
Result fsFileWrite(FsFile* f, u64 off, const void* buf, size_t len);

View File

@ -1008,6 +1008,9 @@ Result fsFsCleanDirectoryRecursively(FsFileSystem* fs, const char* path) {
}
Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *in, size_t in_size, const char* path, FsFileSystemQueryType query_type) {
if (!kernelAbove400())
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
char send_path[FS_MAX_PATH] = {0};
strncpy(send_path, path, sizeof(send_path)-1);