/** * Returns the length of the file denoted by the specified path. * * @param path the full path name of the file to be checked. * @return The length, in bytes, of the file denoted by this pathname, or 0L if the file does not * exist * @see java.io.File.length() * @author Goh Kan Mun * @since 2.0 * @version 2.0 */ public long length(String path) { try { if (_isLocal) { File tmpFile = new File(_rootFile.getCanonicalPath() + File.separatorChar + path); return (tmpFile.length()); } else { return _remote.length(_domain, path); } } catch (Exception ex) { ex.printStackTrace(); } return 0l; }