本文整理汇总了TypeScript中tns-core-modules/file-system/file-name-resolver.FileNameResolver类的典型用法代码示例。如果您正苦于以下问题:TypeScript FileNameResolver类的具体用法?TypeScript FileNameResolver怎么用?TypeScript FileNameResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FileNameResolver类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: createPage
export function createPage() {
var page = new pages.Page();
var lbl = new label.Label();
var moduleName = "tests/pages/files/test";
var resolver = new fileResolverModule.FileNameResolver({
width: 400,
height: 600,
os: "android",
deviceType: "phone"
});
// Current app full path.
var currentAppPath = fs.knownFolders.currentApp().path;
var moduleNamePath = fs.path.join(currentAppPath, moduleName);
var fileName = resolver.resolveFileName(moduleNamePath, "xml");
lbl.text = fileName;
lbl.textWrap = true;
page.content = lbl;
return page;
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:24,代码来源:file-load-test.ts
示例2: test_file_resolver_with_ios_phone_portrait
export function test_file_resolver_with_ios_phone_portrait() {
var fileResolver = new resolver.FileNameResolver(iPhonePortraitContext);
var result = fileResolver.resolveFileName(testFilePath, "xml");
TKUnit.assertEqual(result, testFilePath + ".xml", "File path");
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:5,代码来源:file-name-resolver-tests.ts
示例3: test_file_resolver_with_andorid_tablet_portrait
export function test_file_resolver_with_andorid_tablet_portrait() {
var fileResolver = new resolver.FileNameResolver(androidTabletPortraitContext);
var result = fileResolver.resolveFileName(testFilePath, "xml");
TKUnit.assertEqual(result, testFilePath + ".minWH600.xml", "File path");
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:5,代码来源:file-name-resolver-tests.ts
示例4: test_file_resolver_with_andorid_phone_landscape
export function test_file_resolver_with_andorid_phone_landscape() {
var fileResolver = new resolver.FileNameResolver(androidPhoneLandsacpeContext);
var result = fileResolver.resolveFileName(testFilePath, "xml");
TKUnit.assertEqual(result, testFilePath + ".land.xml", "File path");
}
开发者ID:NathanWalker,项目名称:NativeScript,代码行数:5,代码来源:file-name-resolver-tests.ts
注:本文中的tns-core-modules/file-system/file-name-resolver.FileNameResolver类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论