summaryrefslogtreecommitdiff
path: root/src/core/file_sys/file.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-10-06 15:25:19 -0400
committerGravatar bunnei2014-10-06 15:25:19 -0400
commit0e2d83fa3ab4aad56dc8813e45d5fdfe05132a5a (patch)
tree766620c93a936e767cc073382573660041c2e193 /src/core/file_sys/file.h
parentMerge pull request #125 from purpasmart96/master (diff)
parentCommon: Add a helper function to generate a 8.3 filename from a long one. (diff)
downloadyuzu-0e2d83fa3ab4aad56dc8813e45d5fdfe05132a5a.tar.gz
yuzu-0e2d83fa3ab4aad56dc8813e45d5fdfe05132a5a.tar.xz
yuzu-0e2d83fa3ab4aad56dc8813e45d5fdfe05132a5a.zip
Merge pull request #129 from linkmauve/master
Fix the filesystem implementation in order to get blargSnes to run
Diffstat (limited to 'src/core/file_sys/file.h')
-rw-r--r--src/core/file_sys/file.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/file_sys/file.h b/src/core/file_sys/file.h
index f7b009f5a..4013b6c3e 100644
--- a/src/core/file_sys/file.h
+++ b/src/core/file_sys/file.h
@@ -19,6 +19,12 @@ public:
19 virtual ~File() { } 19 virtual ~File() { }
20 20
21 /** 21 /**
22 * Open the file
23 * @return true if the file opened correctly
24 */
25 virtual bool Open() = 0;
26
27 /**
22 * Read data from the file 28 * Read data from the file
23 * @param offset Offset in bytes to start reading data from 29 * @param offset Offset in bytes to start reading data from
24 * @param length Length in bytes of data to read from file 30 * @param length Length in bytes of data to read from file
@@ -31,8 +37,8 @@ public:
31 * Write data to the file 37 * Write data to the file
32 * @param offset Offset in bytes to start writing data to 38 * @param offset Offset in bytes to start writing data to
33 * @param length Length in bytes of data to write to file 39 * @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) 40 * @param flush The flush parameters (0 == do not flush)
41 * @param buffer Buffer to read data from
36 * @return Number of bytes written 42 * @return Number of bytes written
37 */ 43 */
38 virtual size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const = 0; 44 virtual size_t Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const = 0;
@@ -44,6 +50,13 @@ public:
44 virtual size_t GetSize() const = 0; 50 virtual size_t GetSize() const = 0;
45 51
46 /** 52 /**
53 * Set the size of the file in bytes
54 * @param size New size of the file
55 * @return true if successful
56 */
57 virtual bool SetSize(const u64 size) const = 0;
58
59 /**
47 * Close the file 60 * Close the file
48 * @return true if the file closed correctly 61 * @return true if the file closed correctly
49 */ 62 */