コード例 #1
0
        public SymbolicFile(string filename, SymbolicFile parent = null)
        {
            this.parent = parent;
            if (!File.Exists(filename))
            {
                throw new ArgumentException(string.Format("File {0} does not exist", filename));
            }
            this.filename = filename;
            format        = Format.Guess(filename);

            _folder = null;
            string asocfolder = AssociatedFolder(filename);

            if (Directory.Exists(asocfolder))
            {
                _folder = new FileContainer(Path.GetDirectoryName(asocfolder), Path.GetFileName(asocfolder), format.LowerLevel());
            }

            DisplayName = DefaultStructure.GetDisplayName(filename); //TODO - DefaultStructure class
        }
コード例 #2
0
 public void Link(SymbolicFile parent)
 {
     Array.ForEach(Files, x => x.Link(parent));
 }
コード例 #3
0
 public void Link(SymbolicFile parent)
 {
     this.parent = parent;
     //Make all of the folders also excecute the linking
 }