equal
deleted
inserted
replaced
115 result[0]=0xE5; |
115 result[0]=0xE5; |
116 } |
116 } |
117 return result; |
117 return result; |
118 } |
118 } |
119 |
119 |
120 TInt NumberOfVFatEntries(TInt aNameLength) |
120 /** |
121 // |
121 @param aNameLength file name length |
122 // Return the number of VFat entries required to describe a filename of length aNameLength |
122 @return the number of VFat entries required to describe a filename of length aNameLength |
123 // |
123 */ |
|
124 TUint NumberOfVFatEntries(TUint aNameLength) |
124 { |
125 { |
125 TInt numberOfEntries=0; |
126 ASSERT(aNameLength); |
126 if (aNameLength%KMaxVFatEntryName) |
127 //-- 1 compulsory DOS entry included |
127 aNameLength++; // Include a zero terminator |
128 const TUint numberOfEntries=1+(aNameLength + KMaxVFatEntryName - 1) / KMaxVFatEntryName; |
128 // If aNameLength is a exact multiple of KMaxVFatEntryName, don't bother |
129 return numberOfEntries; |
129 // with a zero terminator - it just adds an unnecessary directory entry |
|
130 |
|
131 numberOfEntries=(1+(aNameLength/KMaxVFatEntryName)); |
|
132 |
|
133 if (aNameLength%KMaxVFatEntryName) |
|
134 numberOfEntries++; |
|
135 |
|
136 return(numberOfEntries); |
|
137 } |
130 } |
138 |
131 |
139 //----------------------------------------------------------------------------- |
132 //----------------------------------------------------------------------------- |
140 /** |
133 /** |
141 Calculate DOS short name checksum |
134 Calculate DOS short name checksum |