Class Platform.WindowsPlatform

  • Enclosing class:
    Platform

    private static class Platform.WindowsPlatform
    extends Platform
    Platform implementation for Microsoft Windows-like systems.
    • Constructor Summary

      Constructors 
      Constructor Description
      WindowsPlatform()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] getGetenvArgs​(java.lang.String varname)
      Returns an array of words to pass to Runtime.exec(java.lang.String[]) in order to read an environment variable name.
      java.io.File getHomeDirectory()
      Returns SAMP's definition of the "home" directory.
      protected java.lang.String[] getPrivateReadArgs​(java.io.File file)
      Returns an array of words to pass to Runtime.exec(java.lang.String[]) in order to set permissions on a given file so that it cannot be read by anyone other than its owner.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WindowsPlatform

        WindowsPlatform()
        Constructor.
    • Method Detail

      • getPrivateReadArgs

        protected java.lang.String[] getPrivateReadArgs​(java.io.File file)
                                                 throws java.io.IOException
        Description copied from class: Platform
        Returns an array of words to pass to Runtime.exec(java.lang.String[]) in order to set permissions on a given file so that it cannot be read by anyone other than its owner. If null is returned, no way is known to do this with a system command.
        Specified by:
        getPrivateReadArgs in class Platform
        Parameters:
        file - file to alter
        Returns:
        exec args
        Throws:
        java.io.IOException
      • getHomeDirectory

        public java.io.File getHomeDirectory()
        Description copied from class: Platform
        Returns SAMP's definition of the "home" directory.
        Specified by:
        getHomeDirectory in class Platform
        Returns:
        directory containing SAMP lockfile
      • getGetenvArgs

        public java.lang.String[] getGetenvArgs​(java.lang.String varname)
        Description copied from class: Platform
        Returns an array of words to pass to Runtime.exec(java.lang.String[]) in order to read an environment variable name. If null is returned, no way is known to do this with a system command.
        Specified by:
        getGetenvArgs in class Platform
        Parameters:
        varname - environment variable name to read
        Returns:
        exec args