Re: [Factor-talk] Search Files by Name

2016-10-29 Thread John Benediktsson
Also, I should point out that ``glob`` doesn't require ``with-directory``: "C:\dir\**\progname" glob On Sat, Oct 29, 2016 at 8:39 AM, John Benediktsson wrote: > You can use recursive globs (which are case-insensitive) as @bjourne says, > or you can use

[Factor-talk] Firebird Bindings

2016-10-29 Thread Alexander Ilin
Hello! Do we have the Firebird DB bindings?Do we support the ODBC standard? ---=---Александр  -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect

Re: [Factor-talk] Firebird Bindings

2016-10-29 Thread John Benediktsson
We don't have Firebird DB bindings as far as I know. There is some code in ``unmaintained/odbc`` for binding to odbc32.dll. It might need a little cleanup to get working with latest Factor. On Sat, Oct 29, 2016 at 7:42 AM, Alexander Ilin wrote: > Hello! > > Do we have the

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread John Benediktsson
I hit send before I had a chance to finish that thought -- You can use ``file-info directory?`` to exclude directories or ``file-info regular-file?`` to include only regular files. There are other file types that might be returned in the ``file-info`` tuple:

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread Björn Lindqvist
Perhaps you can use ant-globs. Like this: USE: globs "/the/dir" [ "**/progname*" glob ] with-directory It appears to fold case by default so it should match any PROGNAME files too. It also matches directories which you might want to filter out. 2016-10-29 16:41 GMT+02:00 Alexander Ilin

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread John Benediktsson
You can use recursive globs (which are case-insensitive) as @bjourne says, or you can use ``find-all-files`` in io.directories.search. The name is the fully qualified name, so if you want to match only on the file-name you can do: USE: io.directories.search "C:\dir" [ file-name R/ progname/i

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread Alexander Ilin
Hello! Thank you, Björn and John, for the great suggestions!I didn't know about the `globs` vocab, and it's almost undocumented. A couple of examples wouldn't hurt. Unfortunately, `find-all-files` returns directories as well. Is that a bug? ---=---Александр 

[Factor-talk] Search Files by Name

2016-10-29 Thread Alexander Ilin
Hello! What's the best way to search for all files matching a pattern "progname.*"?Note: in Windows the "name" part is case-insensitive. I see that we have `find-by-extension` in `io.directories.search`, but nothing to search by name. I want to find and scan all log-files in a folder, created by a

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread John Benediktsson
Directories are files too! :-) > On Oct 29, 2016, at 9:24 AM, Alexander Ilin wrote: > > Hello! > > Thank you, Björn and John, for the great suggestions! > I didn't know about the `globs` vocab, and it's almost undocumented. A couple > of examples wouldn't hurt. > >

Re: [Factor-talk] Search Files by Name

2016-10-29 Thread Doug Coleman
You can do things like: USE: io.directories.search "/Users/erg/factor" [ file-name >lower "factor" head? ] find-all-files On Sat, Oct 29, 2016 at 9:55 AM John Benediktsson wrote: > I hit send before I had a chance to finish that thought -- > > You can use ``file-info

Re: [Factor-talk] Firebird Bindings

2016-10-29 Thread Alexander Ilin
Hello! 29.10.2016, 18:41, "John Benediktsson" : There is some code in ``unmaintained/odbc`` for binding to odbc32.dll.  It might need a little cleanup to get working with latest Factor. I made the `odbc` vocab compilable, but when I try to test-run it I get an error. Here's how I