diff --git a/source/dub/internal/utils.d b/source/dub/internal/utils.d index 11d6ccd..14f1438 100644 --- a/source/dub/internal/utils.d +++ b/source/dub/internal/utils.d @@ -171,12 +171,6 @@ moveFile(tmppath, path); } -bool existsDirectory(NativePath path) { - if( !existsFile(path) ) return false; - auto fi = getFileInfo(path); - return fi.isDirectory; -} - void runCommand(string command, string[string] env = null, string workDir = null) { runCommands((&command)[0 .. 1], env, workDir); diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index bfe7775..980052e 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -219,6 +219,13 @@ return std.file.exists(path); } +/// Checks if a directory exists +bool existsDirectory(NativePath path) { + if( !existsFile(path) ) return false; + auto fi = getFileInfo(path); + return fi.isDirectory; +} + /** Stores information about the specified file/directory into 'info' Returns false if the file does not exist.