Package hudson

Examples of hudson.FilePath.child()


                return;
            }

            // convert a directory service request to a single file service request by serving
            // 'index.html'
            baseFile = baseFile.child(indexFileName);
        }

        //serve a single file
        if(!baseFile.exists()) {
            rsp.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here


public class DirScannerTest extends TestCase {

    public void testGlobShouldUseDefaultExcludes() throws Exception {
        FilePath tmp = new FilePath(Util.createTempDir());
        try {
            tmp.child(".gitignore").touch(0);
            FilePath git = tmp.child(".git");
            git.mkdirs();
            git.child("HEAD").touch(0);
           
            DirScanner glob1 = new DirScanner.Glob("**/*", null);
View Full Code Here

        FilePath tmp = new FilePath(Util.createTempDir());
        try {
            tmp.child(".gitignore").touch(0);
            FilePath git = tmp.child(".git");
            git.mkdirs();
            git.child("HEAD").touch(0);
           
            DirScanner glob1 = new DirScanner.Glob("**/*", null);
            DirScanner glob2 = new DirScanner.Glob("**/*", null, true);
            MatchingFileVisitor gitdir = new MatchingFileVisitor("HEAD");
            MatchingFileVisitor gitignore = new MatchingFileVisitor(".gitignore");
View Full Code Here

    }
   
    public void testGlobShouldIgnoreDefaultExcludesByRequest() throws Exception {
        FilePath tmp = new FilePath(Util.createTempDir());
        try {
            tmp.child(".gitignore").touch(0);
            FilePath git = tmp.child(".git");
            git.mkdirs();
            git.child("HEAD").touch(0);
           
            DirScanner glob = new DirScanner.Glob("**/*", null, false);
View Full Code Here

        FilePath tmp = new FilePath(Util.createTempDir());
        try {
            tmp.child(".gitignore").touch(0);
            FilePath git = tmp.child(".git");
            git.mkdirs();
            git.child("HEAD").touch(0);
           
            DirScanner glob = new DirScanner.Glob("**/*", null, false);
            MatchingFileVisitor gitdir = new MatchingFileVisitor("HEAD");
            MatchingFileVisitor gitignore = new MatchingFileVisitor(".gitignore");
           
View Full Code Here

        FilePath dir = new FilePath(File.createTempFile("test","dir"));

        try {
            dir.delete();
            dir.child("subdir").mkdirs();

            FilePath f = dir.child("a.txt");
            f.touch(0);
            f.chmod(0755);
View Full Code Here

            e.mkdirs();

            // extract via the tar command
            assertEquals(0, new LocalLauncher(new StreamTaskListener(System.out)).launch().cmds("tar", "xvf", tar.getAbsolutePath()).pwd(e).join());

            assertEquals(0100755,e.child("a.txt").mode());
            assertEquals(dirMode,e.child("subdir").mode());
            assertEquals(0100644,e.child("subdir/b.txt").mode());


            // extract via the zip command
View Full Code Here

            // extract via the tar command
            assertEquals(0, new LocalLauncher(new StreamTaskListener(System.out)).launch().cmds("tar", "xvf", tar.getAbsolutePath()).pwd(e).join());

            assertEquals(0100755,e.child("a.txt").mode());
            assertEquals(dirMode,e.child("subdir").mode());
            assertEquals(0100644,e.child("subdir/b.txt").mode());


            // extract via the zip command
            e.deleteContents();
View Full Code Here

            // extract via the tar command
            assertEquals(0, new LocalLauncher(new StreamTaskListener(System.out)).launch().cmds("tar", "xvf", tar.getAbsolutePath()).pwd(e).join());

            assertEquals(0100755,e.child("a.txt").mode());
            assertEquals(dirMode,e.child("subdir").mode());
            assertEquals(0100644,e.child("subdir/b.txt").mode());


            // extract via the zip command
            e.deleteContents();
            assertEquals(0, new LocalLauncher(new StreamTaskListener(System.out)).launch().cmds("unzip", zip.getAbsolutePath()).pwd(e).join());
View Full Code Here

            // extract via the zip command
            e.deleteContents();
            assertEquals(0, new LocalLauncher(new StreamTaskListener(System.out)).launch().cmds("unzip", zip.getAbsolutePath()).pwd(e).join());
            e = e.listDirectories().get(0);

            assertEquals(0100755, e.child("a.txt").mode());
            assertEquals(dirMode,e.child("subdir").mode());
            assertEquals(0100644,e.child("subdir/b.txt").mode());
        } finally {
            tar.delete();
            zip.delete();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.