Exemple #1
0
        // Writes a file item
        void WriteItem(MemFile mf)
        {
            mf.SetDynUTF8String(fileName);
            mf.Set(fileTimeCreate.Ticks);
            mf.Set(fileTimeWrite.Ticks);
            mf.Set(fileLength);
            mf.Set(isDirectory);
            if (isDirectory)
            {
                mf.SetDynUTF8String(relPath);
            }
            if (files == null)
            {
                mf.Set((Int32)0);
            }
            else
            {
                mf.Set(files.Count);
                foreach (FileInfo fi in files)
                {
                    fi.WriteItem(mf);
                }
            }

            if (childs == null)
            {
                mf.Set((Int32)0);
            }
            else
            {
                mf.Set(childs.Count);
                foreach (FileInfo fi in childs)
                {
                    fi.WriteItem(mf);
                }
            }
        }
Exemple #2
0
		// Writes a file item
		void WriteItem(MemFile mf)
		{
			mf.SetDynUTF8String(fileName);
			mf.Set(fileTimeCreate.Ticks);
			mf.Set(fileTimeWrite.Ticks);
			mf.Set(fileLength);
			mf.Set(isDirectory);
			if (isDirectory)
				mf.SetDynUTF8String(relPath);
			if (files == null)
				mf.Set((Int32)0);
			else
			{
				mf.Set(files.Count);
				foreach (FileInfo fi in files)
					fi.WriteItem(mf);
			}

			if (childs == null)
				mf.Set((Int32)0);
			else
			{
				mf.Set(childs.Count);
				foreach (FileInfo fi in childs)
					fi.WriteItem(mf);
			}
		}
Exemple #3
0
		// Writes the file structure into a file; uses the basePath for file name
		public void Write(MemFile mf)
		{
			mf.Set((UInt32)0xDEADBEEF);    // Magic word
			mf.Set((UInt32)1);             // Version;
			WriteItem(mf);
		}
Exemple #4
0
 // Writes the file structure into a file; uses the basePath for file name
 public void Write(MemFile mf)
 {
     mf.Set((UInt32)0xDEADBEEF);                // Magic word
     mf.Set((UInt32)1);                         // Version;
     WriteItem(mf);
 }