示例#1
0
        public static string GetRealPath(string path)
        {
            var rv = realpath(path, IntPtr.Zero);

            if (rv != null)
            {
                return(rv);
            }

            var errno = Marshal.GetLastWin32Error();

            ErrorHelper.Warning(54, Errors.MT0054, path, FileCopier.strerror(errno), errno);
            return(path);
        }
示例#2
0
        public static string GetRealPath(string path)
        {
            // For some reason realpath doesn't always like filenames only, and will randomly fail.
            // Prepend the current directory if there's no directory specified.
            if (string.IsNullOrEmpty(Path.GetDirectoryName(path)))
            {
                path = Path.Combine(Environment.CurrentDirectory, path);
            }

            var rv = realpath(path, IntPtr.Zero);

            if (rv != null)
            {
                return(rv);
            }

            var errno = Marshal.GetLastWin32Error();

            ErrorHelper.Warning(54, Errors.MT0054, path, FileCopier.strerror(errno), errno);
            return(path);
        }
示例#3
0
        public static string GetRealPath(string path)
        {
            var rv = realpath(path, IntPtr.Zero);

            if (rv != null)
            {
                return(rv);
            }

            var errno = Marshal.GetLastWin32Error();

            ErrorHelper.Warning(54, "Unable to canonicalize the path '{0}': {1} ({2}).", path, FileCopier.strerror(errno), errno);
            return(path);
        }
示例#4
0
 public static void UpdateDirectory(string source, string target)
 {
     FileCopier.UpdateDirectory(source, target);
 }
示例#5
0
 public static bool IsUptodate(string source, string target, bool check_contents = false, bool check_stamp = true)
 {
     return(FileCopier.IsUptodate(source, target, check_contents, check_stamp));
 }