Package com.xmlcalabash.util

Examples of com.xmlcalabash.util.TreeWriter.addAttribute()


                }
            }

            File f = new File(fn);

            tree.addAttribute(_href, href.getString());
            tree.addAttribute(_exists, f.exists() ? "true" : "false");
            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
View Full Code Here


            }

            File f = new File(fn);

            tree.addAttribute(_href, href.getString());
            tree.addAttribute(_exists, f.exists() ? "true" : "false");
            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
View Full Code Here

            File f = new File(fn);

            tree.addAttribute(_href, href.getString());
            tree.addAttribute(_exists, f.exists() ? "true" : "false");
            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
View Full Code Here

            tree.addAttribute(_href, href.getString());
            tree.addAttribute(_exists, f.exists() ? "true" : "false");
            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");
View Full Code Here

            tree.addAttribute(_exists, f.exists() ? "true" : "false");
            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");
View Full Code Here

            tree.addAttribute(_readable, f.canRead() ? "true" : "false");

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");

                GregorianCalendar cal = new GregorianCalendar();
View Full Code Here

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");

                GregorianCalendar cal = new GregorianCalendar();
                cal.setTimeInMillis(f.lastModified());
View Full Code Here

            if (f.exists()) {
                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");

                GregorianCalendar cal = new GregorianCalendar();
                cal.setTimeInMillis(f.lastModified());
View Full Code Here

                tree.addAttribute(_writable, f.canWrite() ? "true" : "false");
                tree.addAttribute(_size, "" + f.length());
                tree.addAttribute(_absolute, f.isAbsolute() ? "true" : "false");
                tree.addAttribute(_directory, f.isDirectory() ? "true" : "false");
                tree.addAttribute(_hidden, f.isHidden() ? "true" : "false");
                tree.addAttribute(_file, f.isFile() ? "true" : "false");

                GregorianCalendar cal = new GregorianCalendar();
                cal.setTimeInMillis(f.lastModified());

                TimeZone tz = TimeZone.getDefault();
View Full Code Here

                long gmt = f.lastModified() - tz.getRawOffset();
                if (tz.useDaylightTime() && tz.inDaylightTime(cal.getTime())) {
                    gmt -= tz.getDSTSavings();
                }
                cal.setTimeInMillis(gmt);
                tree.addAttribute(_last_modified, String.format("%1$04d-%2$02d-%3$02dT%4$02d:%5$02d:%6$02dZ",
                        cal.get(Calendar.YEAR), cal.get(Calendar.MONTH)+1, cal.get(Calendar.DAY_OF_MONTH),
                        cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)));
            } else {
                String path = f.getAbsolutePath();
                int slash = path.lastIndexOf("/");
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.