문제

Can someone tell me, why the "opendir" doesn't work?

#!/usr/bin/env perl6
use v6;

my $file = 'Dokumente/test_file';

if ( my $fh = open $file, :r ) {
    for $fh.lines -> $line {
    say $line;
    }
} else {
    say "Could not open '$file'";
}


my $dir = 'Dokumente';

my $dh = opendir $dir err die "Could not open $dir: $!";

Output:

Hello, World!
Line 2.
Last line.

Could not find non-existent sub &opendir
current instr.: '_block14' pc 29 (EVAL_1:0)
called from Sub '!UNIT_START' pc 1163 (src/glue/run.pir:20)
called from Sub 'perl6;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1)
called from Sub 'perl6;PCT;HLLCompiler;evalfiles' pc 1303 (compilers/pct/src/PCT/HLLCompiler.pir:707)
called from Sub 'perl6;PCT;HLLCompiler;command_line' pc 1489 (compilers/pct/src/PCT/HLLCompiler.pir:794)
called from Sub 'perl6;Perl6;Compiler;main' pc -1 ((unknown file):-1)

도움이 되었습니까?

해결책

Web web = clientContext.Web;
var subWebInfo = new WebCreationInformation
{
    Description = "",
    Language = 1033,
    Title = "Sub Site",
    Url = "subsite",
    UseSamePermissionsAsParentSite = true,
    WebTemplate = "STS#0"
};
Web subWeb = web.Webs.Add(subWebInfo);
clientContext.Load(subWeb);
clientContext.ExecuteQuery();
.

WebTemplate를 지정하지 않고 작동합니다. 버튼이없는 웹 템플릿 : http://blogs.technet.com/b/praveenh/archive/2013/04/04/get-a-list-of-web-templates-and-ids-in- a-sharepoint-site.aspx

사용자 정의 템플릿을 {guid}으로 사용 #templatename https://stackoverflow.com/questions/3240967/ SharePoint-2010-Create-Site-Code-Code-Custom-Site-Site-Template

CSOM을 사용하여 사용 가능한 사용자 지정 템플릿 목록 : http://yeshagrawal.blogspot.in/ 2013 / 06 / SharePoint-2013-get-all-site-templates.html

언어 코드 (언어 팩이 설치된 경우) : http://technet.microsoft.com/en-us/library/ff463597. ASPX

다른 팁

지금 해결됩니다.

문제는 해당 사용자의 개인 사이트 만있었습니다.나는 그 개인 사이트를 삭제하고 그것을 재창조하도록 강요했다. 그리고 이제는 사용자가 사이트 모음 관리자이다.

이 문제가 발생한 이유를 모르지만 다른 사용자의 개인 사이트에는 아무런 문제가 없습니다.사용자가 사이트 컬렉션의 개인 사이트의 사이트 컬렉션이 될 것이라는 사실은 내가 이슈를 해결하는 데 도움이되었습니다.

I don't have Perl 6, but it looks like you are calling opendir incorrectly. This perl snippet works for me:

my $dh;
opendir $dh, '/home/ar' or die 'Could not open directory';
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top