Exemple #1
0
        private void Prepare()
        {
            rootDir = new DirectoryInfo(txtDest.Text.Trim());
            if (!rootDir.Exists)
            {
                rootDir.Create();
                rootDir.Refresh();
                Nira.FixTimestamp(rootDir);
            }

            tmpDir = new DirectoryInfo(rootDir.FullName.Substring(0, 3) + $"\\.wtmp..{Guid.NewGuid()}..");
            if (!tmpDir.Exists)
            {
                tmpDir.Create();
                tmpDir.Refresh();
                Nira.FixTimestamp(tmpDir);
                #if !DEBUG
                tmpDir.Attributes |= System.IO.FileAttributes.Hidden | FileAttributes.System;
                #endif
            }

            fileExt     = txtFileExt.Text.Trim();
            writeBuffer = new byte[blockZise + 1];
            MaxTask     = int.Parse(txtTasks.Text.Trim());
        }
Exemple #2
0
 private void FixTimestamp(string path)
 {
     lock (obzekt) {
         Nira.FixTimestamp(new FileInfo(path));
         Nira.FixTimestamp(rootDir);
     }
 }