So far (eep!), the documentation talks about file test operators as working with pairs, which will be a weird thing to explain, I guess. I'm wondering if this matters to the mere user at all, and if we should even talk about them in terms of "pairs". I don't want a different set of terms in the docs and Llama6. Even if the current Pugs is different than what the final answer will be, as long as I know the final answer I'll be fine. :)
For a directory that exists, using the adverbial form or the fat arrow form work for true or false things: pugs> 'doc' ~~ :d "doc" pugs> "doc" ~~ d => 1 "doc" pugs> "doc" ~~ d => 0 Bool::False The fat arrow doesn't seem to work as I expected with :s though. I figured that the value of the pair would be the thing to match the answer of the test. I expect these all to be expressions of the same goal (even if they return different things right now): pugs> "doc" ~~ :s # just to show you where I am 136 pugs> ( "doc" ~~ :s ) == 136 Bool::True pugs> ( "doc" ~~ :s ) ~~ 136 Bool::True pugs> "doc" ~~ s => 136 # perhaps accidentally fine 136 So, if I wanted to see if the file had a size of 93 bytes, I'd use 93 as the value of the pair, but that doesn't work. It just returns true again: pugs> "doc" ~~ s => 93 # I want this to fail (return Bool:I:False) 136 Similarly, if that last form should work, I might want to do something similar with the file age tests. I want a file 5 days old (let's ignore fractional days right now): "doc" ~~ M => 5; Which then makes me think I'd want to do something a bit wacky to see if the modtime is greater than 5: "doc" ~~ M => any( 5 ..* ); But, if file tests aren't really meant to be like this and the user shouldn't ever think like this, do I call it a "pair"? That's the question I'll have to answer to the newbie reading LLama6, even though I personally am fine with the term. :)