Beispiel #1
0
 public static string GetSMAElementsFolder(
     this SMCollection collection,
     int elementId = 0)
 {
     return(elementId == 0
 ? collection.CombinePath(SMAFileSystem.CollectionSMAFolder,
                          SMAFileSystem.CollectionElementsFolder,
                          elementId.ToString())
 : collection.CombinePath(SMAFileSystem.CollectionSMAFolder,
                          SMAFileSystem.CollectionElementsFolder));
 }
Beispiel #2
0
 public static string GetElementFilePath(
     this SMCollection collection,
     string filePath)
 {
     return(collection.CombinePath(SMConst.Paths.ElementsFolder,
                                   filePath));
 }
Beispiel #3
0
 public static string GetSMAConfigsSubFolder(
     this SMCollection collection,
     string subFolder)
 {
     return(collection.CombinePath(SMAFileSystem.CollectionSMAFolder,
                                   SMAFileSystem.ConfigsFolder,
                                   subFolder));
 }
Beispiel #4
0
        public static string MakeRelative(this SMCollection collection,
                                          string absolutePath)
        {
            string basePath = collection.CombinePath();

            return(absolutePath.StartsWith(basePath)
        ? absolutePath.Substring(basePath.Length).TrimStart('\\', '/')
        : absolutePath);
        }
Beispiel #5
0
 public static string GetSMAFolder(
     this SMCollection collection)
 {
     return(collection.CombinePath(SMAFileSystem.CollectionSMAFolder));
 }