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); }
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))); }
public FileLink Then(FileName file) => FileLink.From(this, FileResource.From(file));
public FileLink Then(FileResource file) => FileLink.From(this, file);
public FileLink Then(FileName file) { return(FileLink.From(this, FileResource.From(file))); }
public FileLink Then(FileResource file) { return(FileLink.From(this, file)); }