I've been hoogling like bad to try to determine if a function like
this exists.
getDirectoryContents returns sub-directories as well as file names. I
want only the latter, so I'm looking for a suitable filter.
--
Colin Adams
Preston Lancashire
___
Haske
On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul
Adams wrote:
> I've been hoogling like bad to try to determine if a function like
> this exists.
>
> getDirectoryContents returns sub-directories as well as file names. I
> want only the latter, so I'm looking for a suitable filter.
Use System.Directory
Colin Paul Adams wrote:
> I've been hoogling like bad to try to determine if a function like
> this exists.
>
> getDirectoryContents returns sub-directories as well as file names. I
> want only the latter, so I'm looking for a suitable filter.
The first example in this chapter of Real World Hask
Hello Colin,
Monday, June 22, 2009, 10:12:57 AM, you wrote:
> I've been hoogling like bad to try to determine if a function like
> this exists.
> getDirectoryContents returns sub-directories as well as file names. I
> want only the latter, so I'm looking for a suitable filter.
isdir <- withFile
> "Judah" == Judah Jacobson writes:
Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul
Judah> Adams wrote:
>> I've been hoogling like bad to try to determine if a function
>> like this exists.
>>
>> getDirectoryContents returns sub-directories as well as file
>>
2009/6/22 Colin Paul Adams :
>> "Judah" == Judah Jacobson writes:
>
> Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul
> Judah> Adams wrote:
> >> I've been hoogling like bad to try to determine if a function
> >> like this exists.
> >>
> >> getDirectoryContents returns sub
On Mon, 2009-06-22 at 08:53 +0200, Deniz Dogan wrote:
> 2009/6/22 Colin Paul Adams :
> >> "Judah" == Judah Jacobson writes:
> >
> >Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul
> >Judah> Adams wrote:
> >>> I've been hoogling like bad to try to determine if a function
> >>
2009/6/22 Duncan Coutts :
> On Mon, 2009-06-22 at 08:53 +0200, Deniz Dogan wrote:
>> 2009/6/22 Colin Paul Adams :
>> >> "Judah" == Judah Jacobson writes:
>> >
>> > Judah> On Sun, Jun 21, 2009 at 11:12 PM, Colin Paul
>> > Judah> Adams wrote:
>> > >> I've been hoogling like bad to try t
On Mon, Jun 22, 2009 at 2:09 PM, Deniz Dogan wrote:
> I think see what you mean, but I find the argument more of an excuse
> to the poor naming than a solid argument for it. Following the
> convention and intuition that most users have should be more important
> than making the (sometimes unnecessa
2009/6/22 Max Rabkin :
> On Mon, Jun 22, 2009 at 2:09 PM, Deniz Dogan wrote:
>> I think see what you mean, but I find the argument more of an excuse
>> to the poor naming than a solid argument for it. Following the
>> convention and intuition that most users have should be more important
>> than ma
Deniz Dogan writes:
>> One explanation is that isBlah asks "is this thing a blah", but we're
>> not asking that because there is an indirection via the filepath. We're
>> asking "does this filepath refer to a directory" not "is this filename a
>> directory".
> I think see what you mean, but I fi
On Mon, Jun 22, 2009 at 2:54 PM, Deniz Dogan wrote:
> Are you saying that when a function is named "isDirectory" you expect
> it to only check for a trailing forward slash character?
No. I'm saying that *if* isDirectory existed, then (isDirectory
"/no/such/directory/") should equal true on Unix. I
On Jun 22, 2009, at 07:37 , Duncan Coutts wrote:
One explanation is that isBlah asks "is this thing a blah", but we're
not asking that because there is an indirection via the filepath.
We're
asking "does this filepath refer to a directory" not "is this
filename a
directory". The latter could
On Tue, 2009-06-23 at 09:31 -0400, Brandon S. Allbery KF8NH wrote:
> On Jun 22, 2009, at 07:37 , Duncan Coutts wrote:
> > One explanation is that isBlah asks "is this thing a blah", but we're
> > not asking that because there is an indirection via the filepath.
> > We're
> > asking "does this fil
On Jun 23, 2009, at 10:34 , Duncan Coutts wrote:
On Tue, 2009-06-23 at 09:31 -0400, Brandon S. Allbery KF8NH wrote:
Hypothetical?
import System.Posix.Files (getFileStatus, isDirectory)
Yeah, if we could make a standard portable variant of this, that'd be
great.
I've wanted to do that ever
Hello Duncan,
Tuesday, June 23, 2009, 6:34:17 PM, you wrote:
>> > import System.Posix.Files (getFileStatus, isDirectory)
> Yeah, if we could make a standard portable variant of this, that'd be
> great.
isdir <- withFileStatus "isdir?" filename isDirectory
module System.Directory
withFileSt
16 matches
Mail list logo