OS File Context

API Interface

//Delegated method from java/groovy File
String getName();

//Delegated method from java/groovy File
long length();

//Handle to java/groovy DataInputStream
DataInputStream stream();

//Loads the entire content of the file
byte[] data();

//Delegated method from java/groovy File
String getParent();

//Delegated method from java/groovy File
boolean delete();

//Delegated method from java/groovy File
boolean canRead();

//Opens the file for writing
FileOutputStream open();

//Opens the file for reading/writing
RandomAccessFile open(String mode);

//Delegated method from java/groovy File
String getAbsolutePath();

//Delegated method from java/groovy File
boolean exists();

//Delegated method from java/groovy File
boolean canWrite();

//Delegated method from java/groovy File
long lastModified();

//Delegated method from java/groovy File
void deleteOnExit();

//Delegated method from java/groovy File
boolean canExecute();

//Delegated method from java/groovy File
long getTotalSpace();

//Delegated method from java/groovy File
long getFreeSpace();

//Delegated method from java/groovy File
long getUsableSpace();

//Handle to an iterator(String), bufferSize for max data size for each iteration
Iterator<byte[]> iterate(int buffSize);

//Handle to an iterator(String)
Iterator<String> iterate();

//Move and rename this file to a shared domain folder
OSFile moveTo(String path, String fileName);

//Move this file to a shared domain folder
OSFile moveTo(String path);

//Converts the file content to map data structure
Map<String, Object> asMap();

//Converts the file content to String
String asString();

//Copy and rename this file to a shared domain folder
OSFile copyTo(String path, String fileName);

//Copy this file to a shared domain folder
OSFile copyTo(String path);

See Aso

File Rule