Hello Suman,
You can find the API documentation for SharpSVN
here[
^]. In order to add a file into the repository there are two options.
- Import - This option is generally used for the very first time to import the local directory contents into the subversion repository. I generally use it to create the initial project directory structure with standard files. There are 4 variants available in SharpSVN.
- bool import(String, Uri) - This option returns true if import is successful. The first parameter is the absolute path to the folder to be imported recursively. The second argument is the subversion repository url e.g. "http://svn.foo.com/repository/products/myproject/trunk".
- bool import(String, Uri, SvnCommitResult) - Use this option if you want to know the actual error when the API returns False.
- bool import(String, Uri, SvnImportArgs) - Use this option to pass additional arguments. e.g. The log message to be used, disable automatic property settings etc.
- bool import(String, Uri, SvnImportArgs, SvnCommitResult) - Similar to above but upon failure you can obtain the exact details for the error
- Add, Delete & Commit - These are the ones to be used from local working copy to add/delete new/updates files into the remote repository. The Add API will either allow you add all files under a particular path or selectively a single file. Delete API as well allow you to remove a path recursively or a single file. Finally the commit API sends the changes to server, this API takes the root folder path or a collection of file paths.
Please also have a look at this[^] walk through.
Hope this helps you.
Regards,