http://d.puremagic.com/issues/show_bug.cgi?id=9455
Kevin L <kevin.lamo...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kevin.lamo...@gmail.com --- Comment #1 from Kevin L <kevin.lamo...@gmail.com> 2013-07-09 11:38:23 PDT --- (In reply to comment #0) > - Add isBinaryMode/isWriteable/isReadable properties to File, and implement > them as light wrappers around platform-specific functions that get that > information. I vote that there be five new functions: * isReadable(inout(C)[] path) (or perhaps canRead()): for files, a std.stdio.open(..., "r") will succeed; for directories, std.file.dirEntries() will succeed. * isWriteable(inout(C)[] path) (or perhaps canWrite()): for files, a std.stdio.open(..., "w") will succeed; for directories, creating a new file in the directory will succeed (excluding things like no space on device). Open question if this function should detect write-only media and return false if so. * isExecutable(inout(C)[] path) (or perhaps canExecute()): for files, exec()/fork()/popen()/etc. (and wrappers) will succeed; always false for directories. * isTraversable(inout(C)[] path): always false for files; for directories, a chdir() will succeed OR a file in the directory can be stat()d. (This is the traditional POSIX view of execute bit on a directory.) * std.stdio.File.isBinary(): returns true if the file was opened with "rb" or "wb". -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------