home *** CD-ROM | disk | FTP | other *** search
/ Enter 2002 August / EnterCD 8_2002.iso / Internet / Adobe GoLive 6.0 / data1.cab / PF_AppDir_SDK / Samples / Shared / Adobe / generalUtils.js next >
Encoding:
JavaScript  |  2002-03-28  |  1.3 KB  |  51 lines

  1. //------------------------------------------------------------
  2. // ADOBE SYSTEMS INCORPORATED
  3. // Copyright 2000-2002 Adobe Systems Incorporated 
  4. // All Rights Reserved
  5. //
  6. // NOTICE: Adobe permits you to use, modify, and distribute 
  7. // this file in accordance with the terms of the Adobe license 
  8. // agreement accompanying it. If you have received this file 
  9. // from a source other than Adobe, then your use, modification, 
  10. // or distribution of it requires the prior written permission 
  11. // of Adobe.
  12. //------------------------------------------------------------
  13.  
  14. //------------------------------------------------------------
  15. // generalUtils.js
  16. //
  17. // This file contains general purpose functions.
  18. //
  19. // List of functions:
  20. //
  21. // fileDelimiter(): return current platform specific delimiter; 
  22. // i.e., / for Windows and : for Macintosh.
  23.  
  24.  
  25.  
  26. //-------------------------------
  27. // fileDelimiter - return platform specific delimiter
  28. // 
  29. // For Macintosh, return :
  30. // For Windows, return \\
  31. // else return /
  32.  
  33. function fileDelimiter() 
  34. {
  35.     var rtnVal = "";
  36.     
  37.     if (/^Windows/.exec(app.osVersion)) 
  38.     {
  39.         rtnVal = "\\";
  40.     }
  41.     else if (/^Macintosh/.exec(app.osVersion)) 
  42.     {
  43.         rtnVal = ":";
  44.     }
  45.     else 
  46.     { // unknown platform
  47.         rtnVal = "/"; 
  48.     }
  49.     return rtnVal;
  50. }
  51.