Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. FileInfo info = new FileInfo(fileName)
  2. string path = info.FullName;
  3.  
  4. string path = string.Empty;
  5. string fileName = Path.GetFileName(path);
  6.  
  7. public bool ckIsFileOpnen(string sFileFullPath)
  8. {
  9. try
  10. {
  11. using (Stream stream = new FileStream(sFileFullPath, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
  12. {
  13. }
  14. return true; //file is available for write
  15. }
  16. catch { }
  17.  
  18. return false;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement