On Sunday, 17 June 2012 at 08:35:58 UTC, Jonathan M Davis wrote:
Also, you need to check exists before you check isFile,
otherwise isFile will
blow up if the file doesn't exst. And both of those are
properties, so you
should be calling them like
auto filename = args[1];
if(!filename.exists ||
Oh, I just figured out what was going wrong. Apparently, args[0]
is the path to the program itself, and not the first argument.
args[1] is what I need to start reading from!
On Sunday, June 17, 2012 10:21:17 GreatEmerald wrote:
> This is kind of silly, and I probably missed something, but for
> some reason I can't get any kind of text file opened when using
> readText from std.file. This is what I'm trying to do:
>
>import std.stdio;
>import std.file;
>
>
On 06/17/2012 01:21 AM, GreatEmerald wrote:
This is kind of silly, and I probably missed something, but for some
reason I can't get any kind of text file opened when using readText from
std.file. This is what I'm trying to do:
import std.stdio;
import std.file;
int main(string[] args)
{
if (!is
On 17.06.2012 12:21, GreatEmerald wrote:
This is kind of silly, and I probably missed something, but for some
reason I can't get any kind of text file opened when using readText from
std.file. This is what I'm trying to do:
import std.stdio;
import std.file;
int main(string[] args)
{
if (!isFil
This is kind of silly, and I probably missed something, but for
some reason I can't get any kind of text file opened when using
readText from std.file. This is what I'm trying to do:
import std.stdio;
import std.file;
int main(string[] args)
{
if (!isFile(args[0]))
{