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

file: add scope #6574

Merged
merged 1 commit into from
Jun 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions std/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,7 @@ if (isConvertibleToString!R)
// Same as mkdir but ignores "already exists" errors.
// Returns: "true" if the directory was created,
// "false" if it already existed.
private bool ensureDirExists()(in char[] pathname)
private bool ensureDirExists()(scope const(char)[] pathname)
{
import std.exception : enforce;
const pathz = pathname.tempCString!FSChar();
Expand Down Expand Up @@ -2972,7 +2972,7 @@ Params:

Throws: $(LREF FileException) on error.
*/
void mkdirRecurse(in char[] pathname) @safe
void mkdirRecurse(scope const(char)[] pathname) @safe
{
import std.path : dirName, baseName;

Expand Down Expand Up @@ -4294,7 +4294,7 @@ private void copyImpl(scope const(char)[] f, scope const(char)[] t,
$(LREF FileException) if there is an error (including if the given
file is not a directory).
+/
void rmdirRecurse(in char[] pathname)
void rmdirRecurse(scope const(char)[] pathname)
{
//No references to pathname will be kept after rmdirRecurse,
//so the cast is safe
Expand Down Expand Up @@ -5038,7 +5038,7 @@ auto dirEntries(string path, string pattern, SpanMode mode,
* with extra characters are allowed.
*/
Select!(Types.length == 1, Types[0][], Tuple!(Types)[])
slurp(Types...)(string filename, in char[] format)
slurp(Types...)(string filename, scope const(char)[] format)
{
import std.array : appender;
import std.conv : text;
Expand Down