You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please add is_temp (and is_tempfile and is_tempdir if possible) predicate(s).
They would, of course, return true if the path object represents a temporary file or directory, as determined by whether it contains a File::Temp object.
My use case is that I cache paths to non-temporary files/directories (as strings) to an external YAML file, but skip temp files/dirs so I would like a way to determine whether a path is a temp which doesn't throw if it is not like cached_temp does.
I could of course (and do currently) use Try::Tiny or an eval block but that should ideally involve checking that it dies for the right reason, and that is both a lot of hassle for doing such a thing and a blunt tool.
The text was updated successfully, but these errors were encountered:
Please add
is_temp
(andis_tempfile
andis_tempdir
if possible) predicate(s).They would, of course, return true if the path object represents a temporary file or directory, as determined by whether it contains a File::Temp object.
My use case is that I cache paths to non-temporary files/directories (as strings) to an external YAML file, but skip temp files/dirs so I would like a way to determine whether a path is a temp which doesn't throw if it is not like
cached_temp
does.I could of course (and do currently) use Try::Tiny or an eval block but that should ideally involve checking that it dies for the right reason, and that is both a lot of hassle for doing such a thing and a blunt tool.
The text was updated successfully, but these errors were encountered: