Exemple #1
0
        public override FileSystemInfo[] Detect(Stream stream, VolumeInfo volume)
        {
            if (HfsPlusFileSystem.Detect(stream))
            {
                return(new FileSystemInfo[] { new VfsFileSystemInfo("HFS+", "Apple HFS+", Open) });
            }

            return(new FileSystemInfo[0]);
        }
Exemple #2
0
        /// <inheritdoc/>
        public override FileSystemInfo[] Detect(Stream stream, VolumeInfo volume)
        {
            if (HfsPlusFileSystem.Detect(stream))
            {
                return(new FileSystemInfo[] { new VfsFileSystemInfo("HFS+", "Apple HFS+", this.Open) });
            }

            return(Array.Empty <FileSystemInfo>());
        }
Exemple #3
0
        protected override void DoRun()
        {
            using(var disk = VirtualDisk.OpenDisk(_dmg.Value, FileAccess.Read))
            using(HfsPlusFileSystem hfs = new HfsPlusFileSystem(disk.Partitions[3].Open()))
            {
                var source = hfs.GetDirectoryInfo(_folder.Value);
                var target = new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, source.Name));

                if(target.Exists)
                {
                    target.Delete(true);
                }

                target.Create();

                CopyDirectory(source, target, _recursive.IsPresent);
            }
        }