CommandLineArguments args )
{
assertCorrectNumberOfArgs( args, 0, 2 );
assertConfigurationInitialized( );
CloudPath path = CliSession.getSession( ).getCurrentDirectory( );
boolean recursive = false;
boolean pathInitialized = false;
if (args.hasFlag("recursive"))
{
recursive=true;
}
for (String arg : args.getArguments())
{
if (pathInitialized)
{
err.println( "Cannot specify more than one path argument." );
err.println( "Usage:" );
err.println( getUsage( ) );
}
path = new CloudPath( arg , path , CliSession.getSession( )
.getCloudloop( ) );
pathInitialized = true;
}
CloudStore cloudStore = (CloudStore) path.getCloudProvider( );
CloudStoreDirectory cloudStoreDirectory = cloudStore.getDirectory( path
.getPath( ) );
CloudStoreObject[] cloudStoreObjects = cloudStoreDirectory
.listContents( recursive );
for (CloudStoreObject cloudStoreObject : cloudStoreObjects)