Ejemplo n.º 1
0
        //public void FileWriteAllText(string path, string content)
        //{
        //    path = ToAmigaPath(path);
        //    var bytes = LhaEncoding.GetBytes(content);
        //    var dateTime = DateTime.Now;
        //    AddLhaContent(path, bytes, dateTime, 0x00);
        //}

        public void FileCopy(IFileHandler sourceFileHandler, string syncSourcePath, string path)
        {
            if (FileExists(path))
            {
                FileDelete(path);
            }
            path = ToAmigaPath(path);
            var sourceBytes = sourceFileHandler.FileReadAllBytes(syncSourcePath);
            //var sourceFileInfo = new FileInfo(syncSourcePath);
            //var dateTime = sourceFileInfo.LastWriteTime;
            var getDate = sourceFileHandler.GetDate(syncSourcePath);

            AddLhaContent(path, sourceBytes, getDate.DateTime, getDate.Attributes.GetAmigaAttributes());
        }