Package org.apache.activemq.apollo.util.os

Examples of org.apache.activemq.apollo.util.os.CLibrary.link()


              throw IOExceptionSupport.create(e);
            }
          }

                    public void hardlink(File source, File target) throws IOException {
                        int rc = lib.link(source.getCanonicalPath(), target.getCanonicalPath());
                        if( rc != 0 ){
                            throw new IOException("Hard link failed with result code="+rc);
                        }
                    }
                };
View Full Code Here


                public void sync(FileDescriptor fd) throws IOException {
                    fd.sync();
                }

                public void hardlink(File source, File target) throws IOException {
                    int rc = lib.link(source.getCanonicalPath(), target.getCanonicalPath());
                    if( rc != 0 ){
                        throw new IOException("Hard link failed with result code="+rc);
                    }
                }
            };
View Full Code Here

        try {
            final CLibrary lib = getCLibrary();
            return new HardLinkStrategy() {
                public void hardlink(File source, File target) throws IOException {
                    int rc = lib.link(source.getCanonicalPath(), target.getCanonicalPath());
                    if( rc != 0 ){
                        throw new IOException("Hard link failed with result code="+rc);
                    }
                }
            };
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.