Skip to content

Commit

Permalink
Added a property for the current directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-David Gadina committed Feb 19, 2012
1 parent 9ffa33d commit 67c287d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions EOSFTPServer/FTPServer/Classes/EOSFTPServerConnection.h
Expand Up @@ -57,6 +57,7 @@
BOOL _authenticated;
NSStringEncoding _encoding;
EOSFTPServerConnectionType _type;
NSString * _currentDirectory;
id < EOSFTPServerConnectionDelegate > _delegate;

@private
Expand All @@ -68,6 +69,7 @@
@property( atomic, readwrite, assign ) BOOL authenticated;
@property( atomic, readwrite, assign ) NSStringEncoding encoding;
@property( atomic, readwrite, assign ) EOSFTPServerConnectionType type;
@property( atomic, readwrite, copy ) NSString * currentDirectory;
@property( atomic, readwrite, assign ) id < EOSFTPServerConnectionDelegate > delegate;

- ( id )initWithSocket: ( AsyncSocket * )socket server: ( EOSFTPServer * )server;
Expand Down
13 changes: 8 additions & 5 deletions EOSFTPServer/FTPServer/Classes/EOSFTPServerConnection.m
Expand Up @@ -46,11 +46,12 @@

@implementation EOSFTPServerConnection

@synthesize username = _username;
@synthesize authenticated = _authenticated;
@synthesize encoding = _encoding;
@synthesize type = _type;
@synthesize delegate = _delegate;
@synthesize username = _username;
@synthesize authenticated = _authenticated;
@synthesize encoding = _encoding;
@synthesize type = _type;
@synthesize currentDirectory = _currentDirectory;
@synthesize delegate = _delegate;

- ( id )initWithSocket: ( AsyncSocket * )socket server: ( EOSFTPServer * )server
{
Expand All @@ -64,6 +65,7 @@ - ( id )initWithSocket: ( AsyncSocket * )socket server: ( EOSFTPServer * )server
_dataPort = 2001;
_queuedData = [ [ NSMutableArray alloc ] initWithCapacity: 100 ];
_encoding = NSUTF8StringEncoding;
_currentDirectory = [ _server.rootDirectory copy ];

[ _connectionSocket setDelegate: self ];

Expand Down Expand Up @@ -93,6 +95,7 @@ - ( void )dealloc
[ _dataConnection release ];
[ _server release ];
[ _queuedData release ];
[ _currentDirectory release ];

[ super dealloc ];
}
Expand Down

0 comments on commit 67c287d

Please sign in to comment.