FileSys/Kernel: Implement SetSize service call for File objects.

This commit is contained in:
Emmanuel Gil Peyrot
2014-09-27 19:16:51 +00:00
parent d34673990b
commit 23c2fbfc7a
6 changed files with 49 additions and 0 deletions

View File

@ -75,6 +75,17 @@ size_t File_SDMC::GetSize() const {
return static_cast<size_t>(file->GetSize());
}
/**
* Set the size of the file in bytes
* @param size New size of the file
* @return true if successful
*/
bool File_SDMC::SetSize(const u64 size) const {
file->Resize(size);
file->Flush();
return true;
}
/**
* Close the file
* @return true if the file closed correctly