Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 210400

Re: Reading / Writing to Network Shares using vCO

$
0
0

If i were to allow a full directory instead of a file, do I just type in:

 

  1. +r \\192.168.10.120\Shares\


Update: Added some debugging lines... perhaps someone who sees this can find something I didn't.... it does alarm me that Orchestrator thinks it is a local file:


[2013-07-09 17:41:15.942] [I] Dumping File Information for: '/tmp/xFiles/test.log'

[2013-07-09 17:41:15.944] [I]   Dir: /tmp/xFiles/

[2013-07-09 17:41:15.945] [I]   Exist: true

[2013-07-09 17:41:15.946] [I]   Hostname: localhost

[2013-07-09 17:41:15.948] [I]   isDir: false

[2013-07-09 17:41:15.949] [I]   length: 117

[2013-07-09 17:41:15.951] [I]   ext: log

[2013-07-09 17:41:15.953] [I]   isLocal: true

[2013-07-09 17:41:15.954] [I]   name: test.log

[2013-07-09 17:41:15.955] [I]   path: /tmp/xFiles/test.log

[2013-07-09 17:41:15.957] [I]   canRead: true

[2013-07-09 17:41:15.959] [I]   canWrite: true

[2013-07-09 17:41:15.961] [I] Dumping File Information for: '\\172.16.167.33\vCOShares\simple.tmp'

[2013-07-09 17:41:15.962] [I]   Dir: //172.16.167.33/vCOShares/

[2013-07-09 17:41:15.963] [I]   Exist: true

[2013-07-09 17:41:15.965] [I]   Hostname: localhost

[2013-07-09 17:41:15.966] [I]   isDir: false

[2013-07-09 17:41:15.968] [I]   length: 117

[2013-07-09 17:41:15.970] [I]   ext: tmp

[2013-07-09 17:41:15.971] [I]   isLocal: true

[2013-07-09 17:41:15.972] [I]   name: simple.tmp

[2013-07-09 17:41:15.974] [I]   path: \\172.16.167.33\vCOShares\simple.tmp

[2013-07-09 17:41:15.975] [I]   canRead: true

[2013-07-09 17:41:15.977] [I]   canWrite: true

 

function for that (and the two lines that call it) are as follows:

function writeToFile(filename)

{

  var testFile = new File(filename);

 

  System.log("Dumping File Information for: '" + filename + "'");

  System.log("  Dir: " + testFile.directory);

  System.log("  Exist: " + testFile.exists);

  System.log("  Hostname: " + testFile.hostname);

  System.log("  isDir: " + testFile.isDir);

  System.log("  length: " + testFile.length);

  System.log("  ext: " + testFile.extension);

  System.log("  isLocal: " + testFile.isLocal);

  System.log("  name: " + testFile.name);

  System.log("  path: " + testFile.path);

  System.log("  canRead: " + testFile.canRead());

  System.log("  canWrite: " + testFile.canWrite());

 

  testFile.write("doesn't really matter");

}

 

writeToFile("/tmp/xFiles/test.log");

writeToFile("\\\\172.16.167.33\\vCOShares\\simple.tmp");


Viewing all articles
Browse latest Browse all 210400

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>