Euphoria Ticket #515: Add an is_*() functions for working with the file system

We should probably have:

  • is_directory
  • is_file
  • is_executable
  • is_writable
  • is_readable


Type: Feature Request Severity: Normal Category: Library Routine
Assigned To: unknown Status: New Reported Release: 4628
Fixed in SVN #: View VCS: none Milestone: 4.0.2

1. Comment by DerekParnell Dec 08, 2010

I thought we already had "Is A File" and "Is A Directory" functions.

The other should be just one function with an argument ...

has_attrib(theFile, {EXECUTABLE, WRITEABLE, READABLE})  

2. Comment by jimcbrown Dec 08, 2010

function is_a_dir(sequence f) 
	return filesys:file_type(f) == FILETYPE_DIRECTORY 
end function 
function is_a_file(sequence f) 
	return filesys:file_type(f) == FILETYPE_FILE 
end function 

3. Comment by jeremy Dec 08, 2010

Oh, we do. I do not see has_attrib, but I see file_type().

I think it makes sense though to make wrappers as Jim has suggested? They would be inlined and pretty convenient.

4. Comment by DerekParnell Dec 08, 2010

Jim's been doing too much C programming ... try removing the double '=' smile

We don't have the has_attrib() yet, that was just a suggestion.

5. Comment by jeremy Jan 03, 2011

Assigned to 4.0.1 milestone


Quick Links

User menu

Not signed in.

Misc Menu