NINJA-IDE

Module: nfile.py API

No description.


Class: NFile(QObject)

class NFile(QObject):

Function: __init__(path=None) [at ln:50]

def __init__(path=None):


Function: _exists() [at ln:94]

def _exists():
Check if we have been created with a path and if such path exists
In case there is no path, we are most likely a new file.

Function: close() [at ln:211]

def close():
Lets let people know we are going down so they can act upon
As you can see close does nothing but let everyone know that we are
not saved yet

Function: copy(new_path) [at ln:191]

def copy(new_path):
Copy the file to a new path

Function: delete(force=False) [at ln:197]

def delete(force=False):
This deletes the object and closes the file.

Function: display_name() [at ln:69]

def display_name():
Returns a pretty name to be displayed by tabs

Decorators:

  • property

Function: file_ext() [at ln:77]

def file_ext():
"Returns extension of nfile

Decorators:

  • property

Function: file_name() [at ln:59]

def file_name():
"Returns filename of nfile

Decorators:

  • property

Function: file_path() [at ln:84]

def file_path():
"Returns file path of nfile

Decorators:

  • property

Function: has_write_permission() [at ln:89]

def has_write_permission():

No description.


Function: move(new_path) [at ln:166]

def move(new_path):
Phisically move the file

Function: read(path=None) [at ln:150]

def read(path=None):
Read the file or fail

Function: reset_state() [at ln:144]

def reset_state():
#FIXE: to have a ref to changed I need to have the doc here

Function: save(content, path=None, copy=False) [at ln:104]

def save(content, path=None, copy=False):
Write a temprorary file with .tnj extension and copy it over the
original one.
.nsf = Ninja Swap File
#FIXME: Where to locate addExtension, does not fit here
Contents © 2013 NINJA-IDE - Powered by Nikola and Documentor