Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range-ify std.file attribute functions #3447

Merged
merged 1 commit into from
Jul 9, 2015

Conversation

WalterBright
Copy link
Member

timeLastModified()
getAttributes()
getLinkAttributes()
setAttributes()

}
stat_t statbuf = void;

cenforce(trustedStat(name, statbuf) == 0, name);
static if (isNarrowString!R && is(Unqual!(ElementEncodingType!R) == char))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about at least making it a simpler private helper:

enum isUtf8String(R) = is(R : char[]) || is(R : const(char)[]) || is(R: immutable(char)[]);

It's going to have a lot of use internally in this module. As a bonus it won't pull off 3 templates to do this trivial check ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I'd stick with existing templates rather than invent more with overlapping functionality.

@andralex
Copy link
Member

andralex commented Jul 9, 2015

Auto-merge toggled on

andralex added a commit that referenced this pull request Jul 9, 2015
Range-ify std.file attribute functions
@andralex andralex merged commit b7e9336 into dlang:master Jul 9, 2015
@WalterBright WalterBright deleted the rangeattr branch July 9, 2015 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants