diff options
| author | 2014-09-27 19:09:04 +0000 | |
|---|---|---|
| committer | 2014-10-06 19:54:50 +0200 | |
| commit | d34673990b5176c7ab71c239694737a9ac8df14e (patch) | |
| tree | 96a0183e55c86f0a231c0b348ed2e542366bbd87 /src | |
| parent | Merge pull request #125 from purpasmart96/master (diff) | |
| download | yuzu-d34673990b5176c7ab71c239694737a9ac8df14e.tar.gz yuzu-d34673990b5176c7ab71c239694737a9ac8df14e.tar.xz yuzu-d34673990b5176c7ab71c239694737a9ac8df14e.zip | |
FileSys: Add forgotten docstrings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 4 | ||||
| -rw-r--r-- | src/core/file_sys/archive_sdmc.h | 4 | ||||
| -rw-r--r-- | src/core/file_sys/file.h | 2 | ||||
| -rw-r--r-- | src/core/file_sys/file_romfs.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/file_romfs.h | 2 | ||||
| -rw-r--r-- | src/core/file_sys/file_sdmc.cpp | 23 | ||||
| -rw-r--r-- | src/core/file_sys/file_sdmc.h | 2 |
7 files changed, 35 insertions, 4 deletions
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 30d33be5f..8d0827380 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -24,6 +24,10 @@ Archive_SDMC::Archive_SDMC(const std::string& mount_point) { | |||
| 24 | Archive_SDMC::~Archive_SDMC() { | 24 | Archive_SDMC::~Archive_SDMC() { |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | /** | ||
| 28 | * Initialize the archive. | ||
| 29 | * @return true if it initialized successfully | ||
| 30 | */ | ||
| 27 | bool Archive_SDMC::Initialize() { | 31 | bool Archive_SDMC::Initialize() { |
| 28 | if (!FileUtil::IsDirectory(mount_point)) { | 32 | if (!FileUtil::IsDirectory(mount_point)) { |
| 29 | WARN_LOG(FILESYS, "Directory %s not found, disabling SDMC.", mount_point.c_str()); | 33 | WARN_LOG(FILESYS, "Directory %s not found, disabling SDMC.", mount_point.c_str()); |
diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h index 946f8b957..f68648e6f 100644 --- a/src/core/file_sys/archive_sdmc.h +++ b/src/core/file_sys/archive_sdmc.h | |||
| @@ -20,6 +20,10 @@ public: | |||
| 20 | Archive_SDMC(const std::string& mount_point); | 20 | Archive_SDMC(const std::string& mount_point); |
| 21 | ~Archive_SDMC() override; | 21 | ~Archive_SDMC() override; |
| 22 | 22 | ||
| 23 | /** | ||
| 24 | * Initialize the archive. | ||
| 25 | * @return true if it initialized successfully | ||
| 26 | */ | ||
| 23 | bool Initialize(); | 27 | bool Initialize(); |
| 24 | 28 | ||
| 25 | /** | 29 | /** |
diff --git a/src/core/file_sys/file.h b/src/core/file_sys/file.h index f7b009f5a..3749e4fcf 100644 --- a/src/core/file_sys/file.h +++ b/src/core/file_sys/file.h | |||
| @@ -31,8 +31,8 @@ public: | |||
| 31 | * Write data to the file | 31 | * Write data to the file |
| 32 | * @param offset Offset in bytes to start writing data to | 32 | * @param offset Offset in bytes to start writing data to |
| 33 | * @param length Length in bytes of data to write to file | 33 | * @param length Length in bytes of data to write to file |
| 34 | * @param buffer Buffer to write data from | ||
| 35 | * @param flush The flush parameters (0 == do not flush) | 34 | * @param flush The flush parameters (0 == do not flush) |
| 35 | * @param buffer Buffer to read data from | ||
| 36 | * @return Number of bytes written | 36 | * @return Number of bytes written |
| 37 | */ | 37 | */ |
| 38 | virtual size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const = 0; | 38 | virtual size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const = 0; |
diff --git a/src/core/file_sys/file_romfs.cpp b/src/core/file_sys/file_romfs.cpp index 00f3c2ea8..0709e98f0 100644 --- a/src/core/file_sys/file_romfs.cpp +++ b/src/core/file_sys/file_romfs.cpp | |||
| @@ -32,8 +32,8 @@ size_t File_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const { | |||
| 32 | * Write data to the file | 32 | * Write data to the file |
| 33 | * @param offset Offset in bytes to start writing data to | 33 | * @param offset Offset in bytes to start writing data to |
| 34 | * @param length Length in bytes of data to write to file | 34 | * @param length Length in bytes of data to write to file |
| 35 | * @param buffer Buffer to write data from | ||
| 36 | * @param flush The flush parameters (0 == do not flush) | 35 | * @param flush The flush parameters (0 == do not flush) |
| 36 | * @param buffer Buffer to read data from | ||
| 37 | * @return Number of bytes written | 37 | * @return Number of bytes written |
| 38 | */ | 38 | */ |
| 39 | size_t File_RomFS::Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const { | 39 | size_t File_RomFS::Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const { |
diff --git a/src/core/file_sys/file_romfs.h b/src/core/file_sys/file_romfs.h index 5db43d4a0..28b4f1158 100644 --- a/src/core/file_sys/file_romfs.h +++ b/src/core/file_sys/file_romfs.h | |||
| @@ -32,8 +32,8 @@ public: | |||
| 32 | * Write data to the file | 32 | * Write data to the file |
| 33 | * @param offset Offset in bytes to start writing data to | 33 | * @param offset Offset in bytes to start writing data to |
| 34 | * @param length Length in bytes of data to write to file | 34 | * @param length Length in bytes of data to write to file |
| 35 | * @param buffer Buffer to write data from | ||
| 36 | * @param flush The flush parameters (0 == do not flush) | 35 | * @param flush The flush parameters (0 == do not flush) |
| 36 | * @param buffer Buffer to read data from | ||
| 37 | * @return Number of bytes written | 37 | * @return Number of bytes written |
| 38 | */ | 38 | */ |
| 39 | size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const override; | 39 | size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const override; |
diff --git a/src/core/file_sys/file_sdmc.cpp b/src/core/file_sys/file_sdmc.cpp index 07951c9f1..76e7f5d3d 100644 --- a/src/core/file_sys/file_sdmc.cpp +++ b/src/core/file_sys/file_sdmc.cpp | |||
| @@ -39,11 +39,26 @@ File_SDMC::~File_SDMC() { | |||
| 39 | Close(); | 39 | Close(); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /** | ||
| 43 | * Read data from the file | ||
| 44 | * @param offset Offset in bytes to start reading data from | ||
| 45 | * @param length Length in bytes of data to read from file | ||
| 46 | * @param buffer Buffer to read data into | ||
| 47 | * @return Number of bytes read | ||
| 48 | */ | ||
| 42 | size_t File_SDMC::Read(const u64 offset, const u32 length, u8* buffer) const { | 49 | size_t File_SDMC::Read(const u64 offset, const u32 length, u8* buffer) const { |
| 43 | file->Seek(offset, SEEK_SET); | 50 | file->Seek(offset, SEEK_SET); |
| 44 | return file->ReadBytes(buffer, length); | 51 | return file->ReadBytes(buffer, length); |
| 45 | } | 52 | } |
| 46 | 53 | ||
| 54 | /** | ||
| 55 | * Write data to the file | ||
| 56 | * @param offset Offset in bytes to start writing data to | ||
| 57 | * @param length Length in bytes of data to write to file | ||
| 58 | * @param flush The flush parameters (0 == do not flush) | ||
| 59 | * @param buffer Buffer to read data from | ||
| 60 | * @return Number of bytes written | ||
| 61 | */ | ||
| 47 | size_t File_SDMC::Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const { | 62 | size_t File_SDMC::Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const { |
| 48 | file->Seek(offset, SEEK_SET); | 63 | file->Seek(offset, SEEK_SET); |
| 49 | size_t written = file->WriteBytes(buffer, length); | 64 | size_t written = file->WriteBytes(buffer, length); |
| @@ -52,10 +67,18 @@ size_t File_SDMC::Write(const u64 offset, const u32 length, const u32 flush, con | |||
| 52 | return written; | 67 | return written; |
| 53 | } | 68 | } |
| 54 | 69 | ||
| 70 | /** | ||
| 71 | * Get the size of the file in bytes | ||
| 72 | * @return Size of the file in bytes | ||
| 73 | */ | ||
| 55 | size_t File_SDMC::GetSize() const { | 74 | size_t File_SDMC::GetSize() const { |
| 56 | return static_cast<size_t>(file->GetSize()); | 75 | return static_cast<size_t>(file->GetSize()); |
| 57 | } | 76 | } |
| 58 | 77 | ||
| 78 | /** | ||
| 79 | * Close the file | ||
| 80 | * @return true if the file closed correctly | ||
| 81 | */ | ||
| 59 | bool File_SDMC::Close() const { | 82 | bool File_SDMC::Close() const { |
| 60 | return file->Close(); | 83 | return file->Close(); |
| 61 | } | 84 | } |
diff --git a/src/core/file_sys/file_sdmc.h b/src/core/file_sys/file_sdmc.h index b2e46f449..d23020494 100644 --- a/src/core/file_sys/file_sdmc.h +++ b/src/core/file_sys/file_sdmc.h | |||
| @@ -35,8 +35,8 @@ public: | |||
| 35 | * Write data to the file | 35 | * Write data to the file |
| 36 | * @param offset Offset in bytes to start writing data to | 36 | * @param offset Offset in bytes to start writing data to |
| 37 | * @param length Length in bytes of data to write to file | 37 | * @param length Length in bytes of data to write to file |
| 38 | * @param buffer Buffer to write data from | ||
| 39 | * @param flush The flush parameters (0 == do not flush) | 38 | * @param flush The flush parameters (0 == do not flush) |
| 39 | * @param buffer Buffer to read data from | ||
| 40 | * @return Number of bytes written | 40 | * @return Number of bytes written |
| 41 | */ | 41 | */ |
| 42 | size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const override; | 42 | size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const override; |