Examples of createFile()


Examples of no.ugland.utransprod.service.impl.VismaFileCreatorImpl.createFile()

    final List<OrdchgrLineV> lines = new ArrayList<OrdchgrLineV>();
    lines.add(ordchgrLine);

    VismaFileCreatorImpl vismaFileCreator = new VismaFileCreatorImpl(null,
        false);
    String fileName = vismaFileCreator.createFile(ordchgrHead, lines, "1",
        "visma");

    File file = new File("visma/" + fileName);
    assertEquals(true, file.exists());
    List<String> stringLines = FileUtils.readLines(file);
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

                        + "processing this file or the file is still being uploaded");
            } else {

                // write a lock file before starting of the processing, to ensure that the
                // item is not processed by any other parties
                lockObject.createFile();
                OutputStream stream = lockObject.getContent().getOutputStream();
                try {
                    stream.write(lockValue);
                    stream.flush();
                    stream.close();
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

            throw new Exception("USAGE: touch <path>");
        }
        final FileObject file = mgr.resolveFile(cwd, cmd[1]);
        if (!file.exists())
        {
            file.createFile();
        }
        file.getContent().setLastModifiedTime(System.currentTimeMillis());
    }

    /**
 
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

    {
        FileObject file = null;
        try
        {
            file = createScratchFolder().resolveFile("random_write.txt");
            file.createFile();
            RandomAccessContent ra = file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE);

            // write first byte
            ra.writeByte(TEST_DATA.charAt(0));
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

        // Create a descendant, where the intermediate folders don't exist
        file = scratchFolder.resolveFile("dir1/dir1/file1.txt");
        assertTrue(!file.exists());
        assertTrue(!file.getParent().exists());
        assertTrue(!file.getParent().getParent().exists());
        file.createFile();
        assertTrue(file.exists());
        assertSame(FileType.FILE, file.getType());
        assertEquals(0, file.getContent().getSize());
        assertTrue(file.getParent().exists());
        assertTrue(file.getParent().getParent().exists());
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

        assertFalse(file.getParent().isHidden());
        assertFalse(file.getParent().getParent().isHidden());
       
        // Test creating a file that already exists
        assertTrue(file.exists());
        file.createFile();
        assertTrue(file.exists());
        assertTrue(file.isReadable());
        assertTrue(file.isWriteable());
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

    {
        FileObject scratchFolder = createScratchFolder();

        // Create a test file and folder
        FileObject file = scratchFolder.resolveFile("dir1/file1.txt");
        file.createFile();
        assertEquals(FileType.FILE, file.getType());

        FileObject folder = scratchFolder.resolveFile("dir1/dir2");
        folder.createFolder();
        assertEquals(FileType.FOLDER, folder.getType());
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

        assertEquals(FileType.FOLDER, folder.getType());

        // Attempt to create a file that already exists as a folder
        try
        {
            folder.createFile();
            fail();
        }
        catch (FileSystemException exc)
        {
        }
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

        // Delete again.  Should not get an event
        child.delete();

        // Create as a file
        listener.addCreateEvent();
        child.createFile();
        listener.assertFinished();

        // Create the file again.  Should not get an event
        child.createFile();
View Full Code Here

Examples of org.apache.commons.vfs.FileObject.createFile()

        listener.addCreateEvent();
        child.createFile();
        listener.assertFinished();

        // Create the file again.  Should not get an event
        child.createFile();

        listener.addDeleteEvent();
        child.delete();

        // Create as a file, by writing to it.
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.