diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2011-02-20 04:59:31 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2011-02-20 04:59:31 +0000 |
| commit | 3bb19feba42174a08842e035d21edd424ce9ced1 (patch) | |
| tree | e6a9e60fe4527414e8334db874538677c873b4a2 /src/myriadfs.h | |
| parent | c88a480b9bcabf9aad4f7b66685bbafacc022cc4 (diff) | |
| download | libbu++-3bb19feba42174a08842e035d21edd424ce9ced1.tar.gz libbu++-3bb19feba42174a08842e035d21edd424ce9ced1.tar.bz2 libbu++-3bb19feba42174a08842e035d21edd424ce9ced1.tar.xz libbu++-3bb19feba42174a08842e035d21edd424ce9ced1.zip | |
Cleaned up a little, and added a bunch more stuff to myriadfs. As far as I can
tell, we're missing rename, chown, and chmod.
Diffstat (limited to 'src/myriadfs.h')
| -rw-r--r-- | src/myriadfs.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/myriadfs.h b/src/myriadfs.h index 0b9c97f..b54d170 100644 --- a/src/myriadfs.h +++ b/src/myriadfs.h | |||
| @@ -133,13 +133,16 @@ namespace Bu | |||
| 133 | typedef Bu::List<Stat> Dir; | 133 | typedef Bu::List<Stat> Dir; |
| 134 | 134 | ||
| 135 | void stat( const Bu::String &sPath, Stat &rBuf ); | 135 | void stat( const Bu::String &sPath, Stat &rBuf ); |
| 136 | MyriadStream open( const Bu::String &sPath, int iMode ); | 136 | MyriadStream open( const Bu::String &sPath, int iMode, |
| 137 | uint16_t uPerms=0664 ); | ||
| 137 | void create( const Bu::String &sPath, uint16_t iPerms ); | 138 | void create( const Bu::String &sPath, uint16_t iPerms ); |
| 138 | void create( const Bu::String &sPath, uint16_t iPerms, | 139 | void create( const Bu::String &sPath, uint16_t iPerms, |
| 139 | uint16_t iDevHi, uint16_t iDevLo ); | 140 | uint16_t iDevHi, uint16_t iDevLo ); |
| 140 | void create( const Bu::String &sPath, uint16_t iPerms, | 141 | void create( const Bu::String &sPath, uint16_t iPerms, |
| 141 | uint32_t uSpecial ); | 142 | uint32_t uSpecial ); |
| 142 | void mkDir( const Bu::String &sPath, uint16_t iPerms ); | 143 | void mkDir( const Bu::String &sPath, uint16_t iPerms ); |
| 144 | void mkSymLink( const Bu::String &sPath, const Bu::String &sTarget ); | ||
| 145 | Bu::String readSymLink( const Bu::String &sPath ); | ||
| 143 | Dir readDir( const Bu::String &sPath ); | 146 | Dir readDir( const Bu::String &sPath ); |
| 144 | void setTimes( const Bu::String &sPath, int64_t iATime, | 147 | void setTimes( const Bu::String &sPath, int64_t iATime, |
| 145 | int64_t iMTime ); | 148 | int64_t iMTime ); |
| @@ -168,15 +171,21 @@ namespace Bu | |||
| 168 | int32_t lookupInode( const Bu::String &sPath, int32_t &iParent ); | 171 | int32_t lookupInode( const Bu::String &sPath, int32_t &iParent ); |
| 169 | int32_t lookupInode( Bu::String::const_iterator iStart, | 172 | int32_t lookupInode( Bu::String::const_iterator iStart, |
| 170 | int32_t iNode, int32_t &iParent ); | 173 | int32_t iNode, int32_t &iParent ); |
| 174 | void readInode( int32_t iNode, RawStat &rs, MyriadStream &rIs ); | ||
| 175 | void readInode( int32_t iNode, RawStat &rs ); | ||
| 176 | void writeInode( const RawStat &rs ); | ||
| 177 | void writeInode( const RawStat &rs, MyriadStream &rOs ); | ||
| 171 | Dir readDir( int32_t iNode ); | 178 | Dir readDir( int32_t iNode ); |
| 172 | MyriadStream openByInode( int32_t iNode ); | 179 | MyriadStream openByInode( int32_t iNode ); |
| 173 | int32_t create( int32_t iParent, const Bu::String &sName, | 180 | int32_t create( int32_t iParent, const Bu::String &sName, |
| 174 | uint16_t uPerms, uint32_t uSpecial ); | 181 | uint16_t uPerms, uint32_t uSpecial ); |
| 175 | int32_t allocInode( uint16_t uPerms, uint32_t uSpecial ); | 182 | int32_t allocInode( uint16_t uPerms, uint32_t uSpecial ); |
| 176 | void stat( int32_t iNode, Stat &rBuf, MyriadStream &rIs ); | 183 | void stat( int32_t iNode, Stat &rBuf, MyriadStream &rIs ); |
| 177 | void unlink( int32_t iNode ); | ||
| 178 | void writeHeader(); | 184 | void writeHeader(); |
| 179 | void setTimes( int32_t iNode, int64_t iATime, int64_t iMTime ); | 185 | void setTimes( int32_t iNode, int64_t iATime, int64_t iMTime ); |
| 186 | void destroyNode( int32_t iNode ); | ||
| 187 | |||
| 188 | Bu::String filePart( const Bu::String &sPath ); | ||
| 180 | 189 | ||
| 181 | private: | 190 | private: |
| 182 | Bu::Stream &rStore; | 191 | Bu::Stream &rStore; |
