Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.jconfig.nix.AppUtilsNix

    java.lang.Object
       |
       +----com.jconfig.nix.AppUtilsNix

Summary

    class  AppUtilsNix
         extends java.lang.Object
    {
              // Fields 36
         static final int DATE_ACC_OFFSET;
         static final int DATE_CRE_OFFSET;
         static final int DATE_MOD_OFFSET;
         private static final String copyrightString;
         private static AppUtilsNixI delegate;
         static final int kDateBundleArrayLen;
         static final int kGetMntEntOffs_dir;
         static final int kGetMntEntOffs_fsname;
         static final int kGetMntEntOffs_opts;
         static final int kGetMntEntOffs_type;
         static final int kGetMntEntRetArrayLen;
         static final int kMonitorInfoNumInts;
         static final int kResolveLinkFileNoUI;
         static final int kResolveLinkFileUI;
         static final int kStatFSOffs_bavail;
         static final int kStatFSOffs_bfree;
         static final int kStatFSOffs_blocks;
         static final int kStatFSOffs_bsize;
         static final int kStatFSOffs_ffree;
         static final int kStatFSOffs_files;
         static final int kStatFSOffs_fsid0;
         static final int kStatFSOffs_fsid1;
         static final int kStatFSOffs_type;
         static final int kStatFSRetArrayLen;
         static final int kStatOffs_blksize;
         static final int kStatOffs_blocks;
         static final int kStatOffs_dev;
         static final int kStatOffs_gid;
         static final int kStatOffs_ino;
         static final int kStatOffs_mode;
         static final int kStatOffs_nlink;
         static final int kStatOffs_rdev;
         static final int kStatOffs_size;
         static final int kStatOffs_uid;
         static final int kStatRetArrayLen;
         static final int kUnused;

              // Constructors 1
         private AppUtilsNix();

              // Methods 37
         static final void checkDelegate();
         static int createFileAlias(String, String, int);
         static int createVolumeAlias(String, String, int);
         static String[] findAppsByExtension(String, int, int);
         static String[] findAppsByName(String, int, int);
         static int getAllMonitorInfo(int[], int, int[]);
         static int getDriveDisplayName(String, String[]);
         static int getExecutableType(String, int[]);
         static int getExtIcon(String, int, int, int, int, int, int[]);
         static int getFileAttributes(String, int[]);
         static int getFileAttributesMask(String, int[]);
         static int getFileIcon(String, boolean, int, int, int, int, int, int[]);
         static int getMainMonitorInfo(int[]);
         static int getMntEnt(String[], int, int[]);
         static int getVolumeFlags(String, int[]);
         static int getVolumeIcon(String, int, int, int, int, int, int[]);
         static int getVolumeLabel(String, String[]);
         static int getVolumeMaxFileNameLength(String, int[]);
         static int getVolumeReadFlagsMask(String, int[]);
         static int getVolumeReferenceNumber(String, int[]);
         static int getVolumes(int, int[], String[]);
         static void initialize(boolean, File);
         static boolean isDrivePath(File);
         private static boolean isDriveString(String);
         static boolean isLinkFile(File);
         static int launchApp(String, String, String, String, int[], int, String[]);
         static int launchURL(String, int, String[]);
         static int lstat(String, int[], int[]);
         static int moveApp(int[], int, int);
         static String pathToDriveName(File);
         static int quitApp(int[], int);
         static int readLink(String, String[]);
         static int resolveLinkFile(String, String[], int);
         static int setVolumeLabel(String, String);
         static int stat(String, int[], int[]);
         static int statFS(String, int[]);
         static int verifyNativeAppData(int[]);

    }

This singleton delegates all calls to either a AppUtilsNixLinux or AppUtilsNixPlain object, both of which implement the AppUtilsNixI interface.

These methods are the lowest level, and are called by the other classes in this package. See the AppUtilsNixI interface for details on each of these methods.

The 'initialize' method must be called before using any other methods of this class.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Fields

### · copyrightString | Summary | Top

       private static final String copyrightString

### · kUnused | Summary | Top

       static final int kUnused

### · kDateBundleArrayLen | Summary | Top

       static final int kDateBundleArrayLen

> The stat() and lstat() methods are passed an array of java ints, into which the native code puts the modification, creation and access dates. Each date takes 6 ints: year, month, day, hour, minute, and second. These define the total length of the jint array, and the offset of each date.

### · DATE_MOD_OFFSET | Summary | Top

       static final int DATE_MOD_OFFSET

### · DATE_CRE_OFFSET | Summary | Top

       static final int DATE_CRE_OFFSET

### · DATE_ACC_OFFSET | Summary | Top

       static final int DATE_ACC_OFFSET

### · kStatFSOffs_type | Summary | Top

       static final int kStatFSOffs_type

> The statFS() method is passed an array of ints, into which the native code information on a file system. These constants define the total length of the array, and the offset of each item.

### · kStatFSOffs_bsize | Summary | Top

       static final int kStatFSOffs_bsize

### · kStatFSOffs_blocks | Summary | Top

       static final int kStatFSOffs_blocks

### · kStatFSOffs_bfree | Summary | Top

       static final int kStatFSOffs_bfree

### · kStatFSOffs_bavail | Summary | Top

       static final int kStatFSOffs_bavail

### · kStatFSOffs_files | Summary | Top

       static final int kStatFSOffs_files

### · kStatFSOffs_ffree | Summary | Top

       static final int kStatFSOffs_ffree

### · kStatFSOffs_fsid0 | Summary | Top

       static final int kStatFSOffs_fsid0

### · kStatFSOffs_fsid1 | Summary | Top

       static final int kStatFSOffs_fsid1

### · kStatFSRetArrayLen | Summary | Top

       static final int kStatFSRetArrayLen

### · kGetMntEntOffs_fsname | Summary | Top

       static final int kGetMntEntOffs_fsname

> The getMntEnt() method is passed an array of Strings, into which the native code information on a file system. These constants define the total length of the array, and the offset of each item.

### · kGetMntEntOffs_dir | Summary | Top

       static final int kGetMntEntOffs_dir

### · kGetMntEntOffs_type | Summary | Top

       static final int kGetMntEntOffs_type

### · kGetMntEntOffs_opts | Summary | Top

       static final int kGetMntEntOffs_opts

### · kGetMntEntRetArrayLen | Summary | Top

       static final int kGetMntEntRetArrayLen

### · kStatOffs_dev | Summary | Top

       static final int kStatOffs_dev

> The stat() method is passed an array of ints, into which the native code information on a file. These constants define the total length of the array, and the offset of each item.

### · kStatOffs_ino | Summary | Top

       static final int kStatOffs_ino

### · kStatOffs_mode | Summary | Top

       static final int kStatOffs_mode

### · kStatOffs_nlink | Summary | Top

       static final int kStatOffs_nlink

### · kStatOffs_uid | Summary | Top

       static final int kStatOffs_uid

### · kStatOffs_gid | Summary | Top

       static final int kStatOffs_gid

### · kStatOffs_rdev | Summary | Top

       static final int kStatOffs_rdev

### · kStatOffs_size | Summary | Top

       static final int kStatOffs_size

### · kStatOffs_blksize | Summary | Top

       static final int kStatOffs_blksize

### · kStatOffs_blocks | Summary | Top

       static final int kStatOffs_blocks

### · kStatRetArrayLen | Summary | Top

       static final int kStatRetArrayLen

### · kMonitorInfoNumInts | Summary | Top

       static final int kMonitorInfoNumInts

### · kResolveLinkFileNoUI | Summary | Top

       static final int kResolveLinkFileNoUI

### · kResolveLinkFileUI | Summary | Top

       static final int kResolveLinkFileUI

### · delegate | Summary | Top

       private static AppUtilsNixI delegate

Constructors

### · AppUtilsNix | Summary | Top

       private AppUtilsNix()

Methods

### · initialize | Summary | Top

       static void initialize(boolean bUseLinux,
                              File temp)

> This method must be called before using any other methods of this class. It creates the object to which all other calls will be delegated. If an AppUtilsNixLinux object can't be created (i.e., because we aren't running on Linux), a AppUtilsNixPlain object is created.

> For all other methods, if delegate is null, the method returns null or an error code. Otherwise, it calls the method with the same name in the delegate.

### · checkDelegate | Summary | Top

       static final void checkDelegate()

### · statFS | Summary | Top

       static int statFS(String fileName,
                         int[] retInts)

### · getFileIcon | Summary | Top

       static int getFileIcon(String fullPath,
                              boolean bIsDir,
                              int whichIcon,
                              int w,
                              int h,
                              int xform,
                              int align,
                              int[] pData)

### · getExtIcon | Summary | Top

       static int getExtIcon(String ext,
                             int whichIcon,
                             int w,
                             int h,
                             int xform,
                             int align,
                             int[] pData)

### · getVolumeIcon | Summary | Top

       static int getVolumeIcon(String driveName,
                                int whichIcon,
                                int w,
                                int h,
                                int xform,
                                int align,
                                int[] pData)

### · createVolumeAlias | Summary | Top

       static int createVolumeAlias(String driveName,
                                    String newAliasPath,
                                    int flags)

### · createFileAlias | Summary | Top

       static int createFileAlias(String targetPath,
                                  String newAliasPath,
                                  int flags)

### · isLinkFile | Summary | Top

       static boolean isLinkFile(File fl)

### · isDrivePath | Summary | Top

       static boolean isDrivePath(File fl)

### · pathToDriveName | Summary | Top

       static String pathToDriveName(File fl)

### · isDriveString | Summary | Top

       private static boolean isDriveString(String drivePath)

### · getVolumes | Summary | Top

       static int getVolumes(int maxToReturn,
                             int[] numReturned,
                             String[] driveNames)

### · getVolumeLabel | Summary | Top

       static int getVolumeLabel(String driveName,
                                 String[] label)

### · getVolumeMaxFileNameLength | Summary | Top

       static int getVolumeMaxFileNameLength(String driveName,
                                             int[] nameLen)

### · getVolumeReferenceNumber | Summary | Top

       static int getVolumeReferenceNumber(String driveName,
                                           int[] refNum)

### · setVolumeLabel | Summary | Top

       static int setVolumeLabel(String driveName,
                                 String newLabel)

### · getDriveDisplayName | Summary | Top

       static int getDriveDisplayName(String driveName,
                                      String[] displayName)

### · getVolumeFlags | Summary | Top

       static int getVolumeFlags(String driveName,
                                 int[] flags)

### · getVolumeReadFlagsMask | Summary | Top

       static int getVolumeReadFlagsMask(String driveName,
                                         int[] flags)

### · resolveLinkFile | Summary | Top

       static int resolveLinkFile(String linkFilePath,
                                  String[] retPath,
                                  int flags)

### · getAllMonitorInfo | Summary | Top

       static int getAllMonitorInfo(int[] monitorInfo,
                                    int maxToReturn,
                                    int[] numReturned)

### · getMainMonitorInfo | Summary | Top

       static int getMainMonitorInfo(int[] monitorInfo)

### · getExecutableType | Summary | Top

       static int getExecutableType(String fullPath,
                                    int[] val)

### · getFileAttributes | Summary | Top

       static int getFileAttributes(String fullPath,
                                    int[] val)

### · getFileAttributesMask | Summary | Top

       static int getFileAttributesMask(String fullPath,
                                        int[] val)

### · launchApp | Summary | Top

       static int launchApp(String appPath,
                            String verb,
                            String regKey,
                            String commandLine,
                            int[] retData,
                            int numArgs,
                            String[] args)

### · launchURL | Summary | Top

       static int launchURL(String url,
                            int flags,
                            String[] preferredBrowsers)

### · findAppsByName | Summary | Top

       static String[] findAppsByName(String appName,
                                      int maxToReturn,
                                      int flags)

### · findAppsByExtension | Summary | Top

       static String[] findAppsByExtension(String ext,
                                           int maxToReturn,
                                           int flags)

### · verifyNativeAppData | Summary | Top

       static int verifyNativeAppData(int[] appData)

### · quitApp | Summary | Top

       static int quitApp(int[] appData,
                          int flags)

### · moveApp | Summary | Top

       static int moveApp(int[] appData,
                          int selector,
                          int flags)

### · stat | Summary | Top

       static int stat(String fileName,
                       int[] retArray,
                       int[] datesArray)

### · lstat | Summary | Top

       static int lstat(String fileName,
                        int[] retArray,
                        int[] datesArray)

### · getMntEnt | Summary | Top

       static int getMntEnt(String[] retQuads,
                            int maxToReturn,
                            int[] numReturned)

### · readLink | Summary | Top

       static int readLink(String linkFilePath,
                           String[] retPath)

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7