TicGit.Net.Base.RemoveFile C# (CSharp) Method

RemoveFile() private method

private RemoveFile ( string filename ) : void
filename string
return void
        internal void RemoveFile(string filename)
        {
            string file = filename;
            if (Path.GetFullPath(file) != file) // if not absolute, then absolutize
                file = Path.Combine(Git.WorkingDirectory, file);
            if (!new FileInfo(file).Exists)
                return;
            Git.Index.Remove(file);
            new FileInfo(file).Delete();
        }
    }

Usage Example

示例#1
0
        private void RemoveTagNoCommit(string tag)
        {
            if (string.IsNullOrEmpty(tag))
            {
                return;
            }
            var tag_filename = Path.Combine(TicketName, "TAG_" + tag);

            Base.RemoveFile(tag_filename);
        }
All Usage Examples Of TicGit.Net.Base::RemoveFile