/* Generated automatically by jlpp - do not edit. */ #include static jakelib::lang::String* jakelib2_strings[] = {null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}; // "" static jchar chars_jakelib2_str_0[] = {0}; // ".: '" static jchar chars_jakelib2_str_1[] = {46,58,32,39}; // "'" static jchar chars_jakelib2_str_2[] = {39}; // "- \"" static jchar chars_jakelib2_str_3[] = {45,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34}; // "\"" static jchar chars_jakelib2_str_4[] = {34}; // " getPath: \"" static jchar chars_jakelib2_str_5[] = {32,32,32,32,103,101,116,80,97,116,104,58,32,32,32,32,32,32,32,32,32,32,34}; // "\"" static jchar chars_jakelib2_str_6[] = {34}; // " getAbsolutePath: \"" static jchar chars_jakelib2_str_7[] = {32,32,32,32,103,101,116,65,98,115,111,108,117,116,101,80,97,116,104,58,32,32,34}; // "\"" static jchar chars_jakelib2_str_8[] = {34}; // " getCanonicalPath: \"" static jchar chars_jakelib2_str_9[] = {32,32,32,32,103,101,116,67,97,110,111,110,105,99,97,108,80,97,116,104,58,32,34}; // "\"" static jchar chars_jakelib2_str_10[] = {34}; // "" static jchar chars_jakelib2_str_11[] = {0}; // ".." static jchar chars_jakelib2_str_12[] = {46,46}; // "/" static jchar chars_jakelib2_str_13[] = {47}; // "/home" static jchar chars_jakelib2_str_14[] = {47,104,111,109,101}; // "home/myhome/../test/file.txt" static jchar chars_jakelib2_str_15[] = {104,111,109,101,47,109,121,104,111,109,101,47,46,46,47,116,101,115,116,47,102,105,108,101,46,116,120,116}; // "home/myhome/../../test/file.txt" static jchar chars_jakelib2_str_16[] = {104,111,109,101,47,109,121,104,111,109,101,47,46,46,47,46,46,47,116,101,115,116,47,102,105,108,101,46,116,120,116}; // "home/myhome/../../../test/file.txt" static jchar chars_jakelib2_str_17[] = {104,111,109,101,47,109,121,104,111,109,101,47,46,46,47,46,46,47,46,46,47,116,101,115,116,47,102,105,108,101,46,116,120,116}; // "c:\\windows" static jchar chars_jakelib2_str_18[] = {99,58,92,119,105,110,100,111,119,115}; // "./configure" static jchar chars_jakelib2_str_19[] = {46,47,99,111,110,102,105,103,117,114,101}; #line 1 "FileTest.jlc" // -*- c++ -*- /* * Jakelib2 - General purpose C++ library * Copyright (C) 2001 Florian Wolff (florian@donuz.de) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: FileTest.jlc,v 1.6 2003/09/26 15:55:26 florian Exp $ */ #include "Test.h" #include #include using namespace jakelib::lang; using namespace jakelib::io; //#pragma javasyntax void test_File_listRoots() { try { Files *roots = File::listRoots(); for (int idx = 0; idx < roots->length(); idx++) System::out->println(JAKELIB_ONDEMAND(jakelib2_strings[0], new jakelib::lang::String(chars_jakelib2_str_0, 0, 0)) ->plus( idx )->plus( JAKELIB_ONDEMAND(jakelib2_strings[1], new jakelib::lang::String(chars_jakelib2_str_1, 0, 4)) )->plus( roots->get(idx) )->plus( JAKELIB_ONDEMAND(jakelib2_strings[2], new jakelib::lang::String(chars_jakelib2_str_2, 0, 1)))); } catch (Exception *ex) { System::out->println(ex); } } void test_File_getAbsolutePath(String *filename) { try { File f(filename); System::out->println(JAKELIB_ONDEMAND(jakelib2_strings[3], new jakelib::lang::String(chars_jakelib2_str_3, 0, 23)) ->plus( filename )->plus( JAKELIB_ONDEMAND(jakelib2_strings[4], new jakelib::lang::String(chars_jakelib2_str_4, 0, 1)))); System::out->println(JAKELIB_ONDEMAND(jakelib2_strings[5], new jakelib::lang::String(chars_jakelib2_str_5, 0, 23)) ->plus( f.getPath() )->plus( JAKELIB_ONDEMAND(jakelib2_strings[6], new jakelib::lang::String(chars_jakelib2_str_6, 0, 1)))); System::out->println(JAKELIB_ONDEMAND(jakelib2_strings[7], new jakelib::lang::String(chars_jakelib2_str_7, 0, 23)) ->plus( f.getAbsolutePath() )->plus( JAKELIB_ONDEMAND(jakelib2_strings[8], new jakelib::lang::String(chars_jakelib2_str_8, 0, 1)))); System::out->println(JAKELIB_ONDEMAND(jakelib2_strings[9], new jakelib::lang::String(chars_jakelib2_str_9, 0, 23)) ->plus( f.getCanonicalPath() )->plus( JAKELIB_ONDEMAND(jakelib2_strings[10], new jakelib::lang::String(chars_jakelib2_str_10, 0, 1)))); System::out->println(); } catch (Exception *ex) { System::out->println(ex); } } void fileTest() { try { //test_File_listRoots(); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[11], new jakelib::lang::String(chars_jakelib2_str_11, 0, 0))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[12], new jakelib::lang::String(chars_jakelib2_str_12, 0, 2))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[13], new jakelib::lang::String(chars_jakelib2_str_13, 0, 1))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[14], new jakelib::lang::String(chars_jakelib2_str_14, 0, 5))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[15], new jakelib::lang::String(chars_jakelib2_str_15, 0, 28))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[16], new jakelib::lang::String(chars_jakelib2_str_16, 0, 31))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[17], new jakelib::lang::String(chars_jakelib2_str_17, 0, 34))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[18], new jakelib::lang::String(chars_jakelib2_str_18, 0, 10))); test_File_getAbsolutePath(JAKELIB_ONDEMAND(jakelib2_strings[19], new jakelib::lang::String(chars_jakelib2_str_19, 0, 11))); } catch (Exception *ex) { System::out->println(ex); } }