Ejemplo n.º 1
0
        public static IOLink From(string value, bool strict = true)
        {
            var link = FileLink.From(value, strict: false) ?? FolderLink.From(value, strict: false) as IOLink;

            ExpectNot(strict && link == null, "Value is not an I/O link");

            return(link);
        }
Ejemplo n.º 2
0
        private IEnumerable <FileLink> ReadFileLinksCore(FolderResource subfolder, bool recursive = false)
        {
            var folderPath = Link.Then(subfolder).ToString();
            var pattern    = "*.*";
            var option     = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;

            return(Directory.GetFiles(folderPath, pattern, option).Select(file => FileLink.From(file)));
        }
Ejemplo n.º 3
0
 public FileLink Then(FileName file) =>
 FileLink.From(this, FileResource.From(file));
Ejemplo n.º 4
0
 public FileLink Then(FileResource file) =>
 FileLink.From(this, file);
Ejemplo n.º 5
0
 public FileLink Then(FileName file)
 {
     return(FileLink.From(this, FileResource.From(file)));
 }
Ejemplo n.º 6
0
 public FileLink Then(FileResource file)
 {
     return(FileLink.From(this, file));
 }