From 6c696f426056d5e4b7701c539702651fb3f98cc5 Mon Sep 17 00:00:00 2001 From: Jon Malmaud Date: Thu, 14 May 2015 23:25:37 -0400 Subject: [PATCH] Added ismount function. --- base/stat.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/base/stat.jl b/base/stat.jl index de6f29a25d430..d5a7722d4bbf4 100644 --- a/base/stat.jl +++ b/base/stat.jl @@ -124,3 +124,10 @@ function samefile(a::AbstractString, b::AbstractString) return false end end + +function ismount(path...) + path = abspath(joinpath(path...)) + isdir(path) || return false + parent_path = splitdir(path)[1] + device(path) != device(parent_path) +end