Exemple #1
0
        //public void FileWriteAllText(string path, string content)
        //{
        //    var fullPath = GetFullPath(path);
        //    EnsurePathExists(fullPath);
        //    File.WriteAllText(fullPath, content);
        //    //TODO: Write attrib/date
        //}

        public void FileCopy(IFileHandler sourceFileHandler, string syncSourcePath, string path)
        {
            var fullPath = GetFullPath(path);

            EnsurePathExists(fullPath);
            var bytes = sourceFileHandler.FileReadAllBytes(syncSourcePath);

            //fullPath = _winPathFixer.FixPath(fullPath);
            File.WriteAllBytes(fullPath, bytes);
            //TODO: Write attrib/date
        }
Exemple #2
0
        public void FileCopyBack(string path, IFileHandler contentFileHandler, string contentPath)
        {
            var fullPath = GetFullPath(path);

            EnsurePathExists(fullPath);
            var bytes = contentFileHandler.FileReadAllBytes(contentPath);

            //var getDate = contentFileHandler.GetDate(contentPath);
            File.WriteAllBytes(fullPath, bytes);
            //TODO: Write attrib/date
        }
Exemple #3
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());
        }