Storyboard Pro
Scripting Interface Documentation
File Class Reference

Interface to operating system File operations, ie open, close, read, write... More...

Public Slots

void open (int accessMode)
 Open the file with specific access mode. More...
 
void close ()
 Close the file. More...
 
void remove ()
 Remove the file. More...
 
int readByte ()
 Read the next char of the file. More...
 
String read ()
 Read all the file. More...
 
String readLine ()
 Read one line of the file. More...
 
StringList readLines ()
 Read each line of the file. More...
 
void writeByte (int byte)
 Write a char in the file. More...
 
void write (String &data, int length=-1)
 Write a string in the file. More...
 
void writeLine (String &data)
 Write a string in the file and go next line. More...
 

Public Member Functions

 File (String &file)
 
 ~File ()
 
String fileName ()
 
String path ()
 
String absFileName ()
 
String baseName ()
 
String extension ()
 
String symLink ()
 
bool exists ()
 
bool isReadable ()
 
bool isWritable ()
 
bool isExecutable ()
 
bool isHidden ()
 
bool eof ()
 
QDateTime created ()
 
QDateTime lastModified ()
 
QDateTime lastRead ()
 
int size ()
 

Properties

String name
 file name More...
 
String path
 file path More...
 
String fullName
 file name More...
 
String baseName
 
String extension
 file extension More...
 
String symLink
 
bool exists
 file exist More...
 
bool readable
 file readable flag More...
 
bool writable
 file writable flag More...
 
bool executable
 file executable flag More...
 
bool hidden
 file hidden flag More...
 
bool eof
 file reach end More...
 
QDateTime created
 Date when the file was created. More...
 
QDateTime lastModified
 Date when the file was modified. More...
 
QDateTime lastRead
 date when the file was readed More...
 
int size
 Size of he file. More...
 

Detailed Description

Interface to operating system File operations, ie open, close, read, write...

You can use it in Script Editor only.

var file = new File( filePath );
if ( file.exists )
{
var message = "The output file \"" + file.name + "\" exists. Do you wish to overwrite it?"
var ans = MessageBox.warning(message, MessageBox.Yes, MessageBox.No);
var check = MessageBox.Yes;
if(ans != MessageBox.Yes)
return false;
}
return true;

Constructor & Destructor Documentation

◆ File()

File::File ( String &  file)

◆ ~File()

File::~File ( )

Member Function Documentation

◆ absFileName()

String File::absFileName ( )

◆ baseName()

String File::baseName ( )

◆ close

void File::close ( )
inlineslot

Close the file.

◆ created()

QDateTime File::created ( )

◆ eof()

bool File::eof ( )

◆ exists()

bool File::exists ( )

◆ extension()

String File::extension ( )

◆ fileName()

String File::fileName ( )

◆ isExecutable()

bool File::isExecutable ( )

◆ isHidden()

bool File::isHidden ( )

◆ isReadable()

bool File::isReadable ( )

◆ isWritable()

bool File::isWritable ( )

◆ lastModified()

QDateTime File::lastModified ( )

◆ lastRead()

QDateTime File::lastRead ( )

◆ open

void File::open ( int  accessMode)
slot

Open the file with specific access mode.

◆ path()

String File::path ( )

◆ read

String File::read ( )
slot

Read all the file.

◆ readByte

int File::readByte ( )
slot

Read the next char of the file.

◆ readLine

String File::readLine ( )
slot

Read one line of the file.

◆ readLines

StringList File::readLines ( )
slot

Read each line of the file.

◆ remove

void File::remove ( )
slot

Remove the file.

◆ size()

int File::size ( )

◆ symLink()

String File::symLink ( )

◆ write

void File::write ( String &  data,
int  length = -1 
)
slot

Write a string in the file.

◆ writeByte

void File::writeByte ( int  byte)
slot

Write a char in the file.

◆ writeLine

void File::writeLine ( String &  data)
inlineslot

Write a string in the file and go next line.

Property Documentation

◆ baseName

String File::baseName
read

◆ created

QDateTime File::created
read

Date when the file was created.

◆ eof

bool File::eof
read

file reach end

◆ executable

bool File::executable
read

file executable flag

◆ exists

bool File::exists
read

file exist

◆ extension

String File::extension
read

file extension

◆ fullName

String File::fullName
read

file name

◆ hidden

bool File::hidden
read

file hidden flag

◆ lastModified

QDateTime File::lastModified
read

Date when the file was modified.

◆ lastRead

QDateTime File::lastRead
read

date when the file was readed

◆ name

String File::name
read

file name

◆ path

String File::path
read

file path

◆ readable

bool File::readable
read

file readable flag

◆ size

int File::size
read

Size of he file.

◆ symLink

String File::symLink
read

◆ writable

bool File::writable
read

file writable flag