1147 */ |
1147 */ |
1148 const TPtrC8 TFatDirEntry::Name() const |
1148 const TPtrC8 TFatDirEntry::Name() const |
1149 {return TPtrC8((TUint8*)&(pDir->iName),KFatDirNameSize);} |
1149 {return TPtrC8((TUint8*)&(pDir->iName),KFatDirNameSize);} |
1150 |
1150 |
1151 /** @return The attributes for the Directory entry */ |
1151 /** @return The attributes for the Directory entry */ |
1152 TInt TFatDirEntry::Attributes() const |
1152 TUint TFatDirEntry::Attributes() const |
1153 {return pDir->iAttributes;} |
1153 {return pDir->iAttributes;} |
1154 |
1154 |
1155 /** @return Time of file creation */ |
1155 /** @return Time of file creation */ |
1156 TTime TFatDirEntry::Time() const |
1156 TTime TFatDirEntry::Time() const |
1157 {return DosTimeToTTime(pDir->iTime,pDir->iDate);} |
1157 {return DosTimeToTTime(pDir->iTime,pDir->iDate);} |
1158 |
1158 |
1159 /** @return The Start cluster for the file or directory for this entry */ |
1159 /** @return The Start cluster for the file or directory for this entry */ |
1160 TInt TFatDirEntry::StartCluster() const |
1160 TUint32 TFatDirEntry::StartCluster() const |
1161 { |
1161 { |
1162 const TUint16 KStClustMaskHi = 0x0FFF; |
1162 const TUint16 KStClustMaskHi = 0x0FFF; |
1163 return ((pDir->iStartClusterHi&KStClustMaskHi)<<16) | pDir->iStartClusterLo; |
1163 return ((pDir->iStartClusterHi&KStClustMaskHi)<<16) | pDir->iStartClusterLo; |
1164 } |
1164 } |
1165 |
1165 |
1196 |
1196 |
1197 /** |
1197 /** |
1198 Set the file or directory attributes for this entry |
1198 Set the file or directory attributes for this entry |
1199 @param anAtts The file or directory attributes |
1199 @param anAtts The file or directory attributes |
1200 */ |
1200 */ |
1201 void TFatDirEntry::SetAttributes(TInt anAtts) |
1201 void TFatDirEntry::SetAttributes(TUint anAtts) |
1202 { |
1202 { |
1203 ASSERT(!(anAtts&~KMaxTUint8)); |
1203 ASSERT(!(anAtts&~KMaxTUint8)); |
1204 pDir->iAttributes=(TUint8)anAtts; |
1204 pDir->iAttributes=(TUint8)anAtts; |
1205 } |
1205 } |
1206 |
1206 |
1222 |
1222 |
1223 /** |
1223 /** |
1224 Set the start cluster number of the file or directory refered to by the entry |
1224 Set the start cluster number of the file or directory refered to by the entry |
1225 @param aStartCluster The start cluster number |
1225 @param aStartCluster The start cluster number |
1226 */ |
1226 */ |
1227 void TFatDirEntry::SetStartCluster(TInt aStartCluster) |
1227 void TFatDirEntry::SetStartCluster(TUint32 aStartCluster) |
1228 { |
1228 { |
1229 const TUint32 KHalfWordMask = 0x0000FFFF; |
1229 const TUint32 KHalfWordMask = 0x0000FFFF; |
1230 pDir->iStartClusterLo=(TUint16)(aStartCluster & KHalfWordMask); |
1230 pDir->iStartClusterLo=(TUint16)(aStartCluster & KHalfWordMask); |
1231 pDir->iStartClusterHi=(TUint16)((aStartCluster>>16) & KHalfWordMask); |
1231 pDir->iStartClusterHi=(TUint16)((aStartCluster>>16) & KHalfWordMask); |
1232 } |
1232 } |