コード例 #1
0
        public void JoinTest()
        {
            string path1 = "game.ServerScriptService";
            string path2 = "Test.Module";

            Assert.AreEqual("game.ServerScriptService.Test.Module", RobloxPathHelper.Join(path1, path2));
        }
コード例 #2
0
        public static Script FromFileSystem(string filePath, Mapping mapping)
        {
            string info            = Path.GetFileNameWithoutExtension(filePath);
            string name            = Path.GetFileNameWithoutExtension(info);
            string typeString      = Path.GetExtension(info);
            string relativeFsPath  = PathExtension.MakeRelativePath(mapping.FsPath, filePath);
            string relativeRbxPath = RobloxPathHelper.FromFsPath(relativeFsPath);
            string rbxPath         = RobloxPathHelper.Join(mapping.RobloxPath, relativeRbxPath);

            Script script = new Script();

            script.RobloxPath = rbxPath;
            script.FilePath   = filePath;
            script.Name       = name;
            script.Type       = GetScriptType(typeString);

            return(script);
        }