public static void CreateLocalDirIfNotExists(string dirPath) { if (!String.Equals(string.Empty, dirPath) && !LongPathDirectoryExtension.Exists(dirPath)) { LongPathDirectoryExtension.CreateDirectory(dirPath); } }
public override DMLibDataInfo GetTransferDataInfo(string rootDir) { #if DOTNET5_4 DirectoryInfo rootDirInfo = new DirectoryInfo(Path.Combine(this.BasePath, rootDir)); if (!rootDirInfo.Exists) { return(null); } #else string rootDirInfo = rootDir; if (rootDir.Length == 0) { rootDirInfo = LongPathExtension.Combine(this.BasePath, rootDir); } if (!LongPathDirectoryExtension.Exists(rootDirInfo)) { return(null); } #endif DMLibDataInfo dataInfo = new DMLibDataInfo(rootDir); this.BuildDirNode(rootDirInfo, dataInfo.RootNode); return(dataInfo); }
public DMLibDataInfo GetTransferDataInfo(string rootDir, bool handleSMBAttributes, PreserveSMBPermissions getSMBPermissions) { #if DOTNET5_4 DirectoryInfo rootDirInfo = new DirectoryInfo(Path.Combine(this.BasePath, rootDir)); if (!rootDirInfo.Exists) { return(null); } #else string rootDirInfo = rootDir; if (rootDir.Length == 0) { rootDirInfo = LongPathExtension.Combine(this.BasePath, rootDir); } if (!LongPathDirectoryExtension.Exists(rootDirInfo)) { return(null); } #endif DMLibDataInfo dataInfo = new DMLibDataInfo(rootDir); this.BuildDirNode(rootDirInfo, dataInfo.RootNode, handleSMBAttributes, getSMBPermissions); return(dataInfo); }