Skip to content

Commit

Permalink
Merge pull request #1 from nyxxxie/devel
Browse files Browse the repository at this point in the history
Pull latest
  • Loading branch information
Constantine committed Jan 23, 2017
2 parents 8bbb1d5 + d600dd7 commit 64f52dc
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions spade/project.py → spade/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,24 @@
class Project:
"""Represents an open session for spade."""

def __init__(self, name="(default)", dbfile=":memory:"):
self.name = name;
self.ismem = (dbfile == ":memory:")
self.dbfile = dbfile;
self.db = sqlite3.connect(self.dbfile)

def save(self, dbfile):
"""
Saves the state of a project to a file.
"""
def __create_db_default_tables(self, dbfile):
pass

def load(self, dbfile):
"""
Loads a project from a stored .sdb saved using the save() function.
"""
pass
def __create_db(self, dbfile):
return sqlite3.connect(self.dbfile)

def __init__(self, dbfile):
self.dbfile = dbfile;
self.db = self.__create_db(dbfile)

def add_file(self, f):
def _add_file(self, f):
"""
Adds a file to the project. Fails on adding duplicate files. Can take
both the path to a valid file and a currently open file object.
"""
pass

def remove_file(self, f):
def _remove_file(self, f):
"""
Removes a file from the project.
"""
Expand Down

0 comments on commit 64f52dc

Please sign in to comment.