NINJA-IDE

Contents

Module: file_manager.py API

No description.


Global Functions:

Function: _search_coding_line(txt) [at ln:130]

def _search_coding_line(txt):
Search a pattern like this: # -*- coding: utf-8 -*-.

Function: belongs_to_folder(path, fileName) [at ln:301]

def belongs_to_folder(path, fileName):
Determine if fileName is located under path structure.

Function: check_for_external_modification(fileName, old_mtime) [at ln:318]

def check_for_external_modification(fileName, old_mtime):
Check if the file was modified outside ninja.

Function: convert_to_relative(basePath, fileName) [at ln:287]

def convert_to_relative(basePath, fileName):
Convert a absolut path to relative based on its start with basePath.

Function: create_folder(folderName, add_init_file=True) [at ln:102]

def create_folder(folderName, add_init_file=True):
Create a new Folder inside the one received as a param.

Function: create_init_file(folderName) [at ln:63]

def create_init_file(folderName):
Create a __init__.py file in the folder received.

Function: create_init_file_complete(folderName) [at ln:75]

def create_init_file_complete(folderName):
Create a __init__.py file in the folder received.

This __init__.py will contain the information of the files inside
this folder.

Function: create_path(*args) [at ln:296]

def create_path(*args):
Join the paths provided in order to create an absolut path.

Function: create_tree_folders(folderName) [at ln:111]

def create_tree_folders(folderName):
Create a group of folders, one inside the other.

Function: delete_file(path, fileName=None) [at ln:242]

def delete_file(path, fileName=None):
Delete the proper file.

If fileName is None, path and fileName are joined to create the
complete path, otherwise path is used to delete the file.

Function: delete_folder(path, fileName=None) [at ln:253]

def delete_folder(path, fileName=None):
Delete the proper folder.

Function: file_exists(path, fileName=str) [at ln:123]

def file_exists(path, fileName=str):
Check if a file already exists.

Function: folder_exists(folderName) [at ln:118]

def folder_exists(folderName):
Check if a folder already exists.

Function: get_basename(fileName) [at ln:170]

def get_basename(fileName):
Get the name of a file or folder specified in a path.

Function: get_file_encoding(content) [at ln:139]

def get_file_encoding(content):
Try to get the encoding of the file using the PEP 0263 rules
search the first or the second line of the file
Returns the encoding or the default UTF-8

Function: get_file_extension(fileName) [at ln:271]

def get_file_extension(fileName):
Get the file extension in the form of: 'py'

Function: get_file_name(fileName) [at ln:276]

def get_file_name(fileName):
Get the file name, without the extension.

Function: get_files_from_folder(folder, ext) [at ln:327]

def get_files_from_folder(folder, ext):
Get the files in folder with the specified extension.

Function: get_folder(fileName) [at ln:177]

def get_folder(fileName):
Get the name of the folder containing the file or folder received.

Function: get_last_modification(fileName) [at ln:308]

def get_last_modification(fileName):
Get the last time the file was modified.

Function: get_module_name(fileName) [at ln:281]

def get_module_name(fileName):
Get the name of the file without the extension.

Function: has_write_permission(fileName) [at ln:313]

def has_write_permission(fileName):
Check if the file has writing permissions.

Function: is_supported_extension(filename, extensions=None) [at ln:337]

def is_supported_extension(filename, extensions=None):

No description.


Function: open_project(path) [at ln:214]

def open_project(path):
Return a dict structure containing the info inside a folder.

Function: open_project_with_extensions(path, extensions) [at ln:227]

def open_project_with_extensions(path, extensions):
Return a dict structure containing the info inside a folder.

This function uses the extensions specified by each project.

Function: read_file_content(fileName) [at ln:158]

def read_file_content(fileName):
Read a file content, this function is used to load Editor content.

Function: rename_file(old, new) [at ln:261]

def rename_file(old, new):
Rename a file, changing its name from 'old' to 'new'.

Function: store_file_content(fileName, content, addExtension=True, newFile=False) [at ln:182]

def store_file_content(fileName, content, addExtension=True, newFile=False):
Save content on disk with the given file name.

Class: NinjaFileExistsException(Exception)

class NinjaFileExistsException(Exception):
Try to override existing file without confirmation exception.

Function: __init__(filename=str) [at ln:58]

def __init__(filename=str):

No description.


Class: NinjaNoFileNameException(Exception)

class NinjaNoFileNameException(Exception):
Tried to write a file but I lack a file name

Class: NinjaIOException(Exception)

class NinjaIOException(Exception):
IO operation's exception
Contents © 2013 NINJA-IDE - Powered by Nikola and Documentor