~haggai-eran/nux/rtl-rebased

« back to all changes in this revision

Viewing changes to NuxCore/FileManager/NFileManagerGeneric.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-21 23:49:15 UTC
  • mfrom: (508.1.2 nux-20)
  • Revision ID: jay.taoko@canonical.com-20111021234915-hnzakb5ndebica8i
* Removed custom Nux types: t_u32, t_s32, t_bool, ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    }
50
50
    else
51
51
    {
52
 
      t_u32 Size = Src->GetFileSize();
 
52
      unsigned int Size = Src->GetFileSize();
53
53
      NSerializer *Dest = CreateFileWriter (DestFile.GetTCharPtr(), (OverWriteExisting ? 0 : FILEWRITE_NOREPLACEEXISTING) | (OverWriteReadOnly ? FILEWRITE_EVENIFREADONLY : 0) );
54
54
 
55
55
      if (!Dest)
58
58
      }
59
59
      else
60
60
      {
61
 
        t_u32 Percent = 0, NewPercent = 0;
 
61
        unsigned int Percent = 0, NewPercent = 0;
62
62
        BYTE Buffer[COPYBLOCKSIZE];
63
63
 
64
 
        for (t_u32 Total = 0; Total < Size; Total += sizeof (Buffer) )
 
64
        for (unsigned int Total = 0; Total < Size; Total += sizeof (Buffer) )
65
65
        {
66
 
          t_u32 Count = Min<t_u32> (Size - Total, (t_u32) sizeof (Buffer) );
 
66
          unsigned int Count = Min<unsigned int> (Size - Total, (unsigned int) sizeof (Buffer) );
67
67
          Src->Serialize (Buffer, Count);
68
68
 
69
69
          if (Src->IsError() )
156
156
  {
157
157
    // Support code for making a directory tree.
158
158
    nuxAssert (CreateCompletePath);
159
 
    t_u32 SlashCount = 0, CreateCount = 0;
 
159
    unsigned int SlashCount = 0, CreateCount = 0;
160
160
 
161
161
    for (TCHAR Full[256] = TEXT (""), *Ptr = Full; ; *Ptr++ = *Path++)
162
162
    {
185
185
    nuxAssert (DeleteContentFirst);
186
186
    nuxAssert (Path != NULL);
187
187
 
188
 
    t_size PathLength = StringLength (Path);
 
188
    size_t PathLength = StringLength (Path);
189
189
 
190
190
    if (PathLength == 0)
191
191
      return false;
200
200
    std::vector<NString> List;
201
201
    FindFiles (List, *WildcardPath, 1, 0);
202
202
 
203
 
    for (t_u32 i = 0; i < List.size(); i++)
 
203
    for (unsigned int i = 0; i < List.size(); i++)
204
204
    {
205
205
      if (!Delete (* (NString (Path) + NUX_BACKSLASH_CHAR + List[i]), 1) )
206
206
        return 0;
209
209
    List.clear();
210
210
    FindFiles (List, *WildcardPath, 0, 1);
211
211
 
212
 
    for (t_u32 i = 0; i < List.size(); i++)
 
212
    for (unsigned int i = 0; i < List.size(); i++)
213
213
    {
214
214
      if (!DeleteDirectory (* (NString (Path) + NUX_BACKSLASH_CHAR + List[i]), true) )
215
215
        return 0;
236
236
    nuxAssert (Extension);
237
237
 
238
238
    NString FullPath (Filename);
239
 
    const t_size IndexMarker = FullPath.Length();                       // Marks location of the four-digit index.
 
239
    const size_t IndexMarker = FullPath.Length();                       // Marks location of the four-digit index.
240
240
    FullPath += TEXT ("0000.");
241
241
    FullPath += Extension;
242
242