isPlatformWindows
boolean sutil.isPlatformWindows ( )
Description
Determine if operating system is a Windows platform.
Parameters
This method does not receive parameters.
Return Values
Returns true if the operating system is Windows; otherwise, it returns false.
Change Log
Version | Description |
---|---|
5.0 | Added for all editions. |
Examples
Check Windows Platform
url = "http://www.foo.com/imgs/puppy_image.gif";
// Determine download location based on platform
if ( sutil.isPlatformLinux() )
{
session.downloadFile( url, "/home/user/images/puppy.gif" );
}
else if ( sutil.isPlatformMac() )
{
session.downloadFile( url, "/Volumes/Documents/images/puppy.gif" );
}
else if ( sutil.isPlatformWindows() )
{
session.downloadFile( url, "c:/images/puppy.gif" );
}
// Determine download location based on platform
if ( sutil.isPlatformLinux() )
{
session.downloadFile( url, "/home/user/images/puppy.gif" );
}
else if ( sutil.isPlatformMac() )
{
session.downloadFile( url, "/Volumes/Documents/images/puppy.gif" );
}
else if ( sutil.isPlatformWindows() )
{
session.downloadFile( url, "c:/images/puppy.gif" );
}
scraper on 07/16/2010 at 5:20 pm
- Printer-friendly version
- Login or register to post comments