GetPath() public method

public GetPath ( ) : string
return string
コード例 #1
0
        public static FilePath CreateTempFile(string prefix, string suffix, FilePath directory)
        {
            string file;

            if (prefix == null)
            {
                throw new ArgumentNullException("prefix");
            }
            if (prefix.Length < 3)
            {
                throw new ArgumentException("prefix must have at least 3 characters");
            }
            string str = (directory == null) ? Path.GetTempPath() : directory.GetPath();

            do
            {
                file = Path.Combine(str, prefix + Interlocked.Increment(ref _tempCounter) + suffix);
            } while (File.Exists(file));

            new FileOutputStream(file).Close();
            return(new FilePath(file));
        }
コード例 #2
0
ファイル: FileWriter.cs プロジェクト: Cyber-Forensic/Potato
		public FileWriter (FilePath path) : base(path.GetPath ())
		{
		}
コード例 #3
0
ファイル: FilePath.cs プロジェクト: Cyber-Forensic/Potato
		public static FilePath CreateTempFile (string prefix, string suffix, FilePath directory)
		{
			string file;
			if (prefix == null) {
				throw new ArgumentNullException ("prefix");
			}
			if (prefix.Length < 3) {
				throw new ArgumentException ("prefix must have at least 3 characters");
			}
			string str = (directory == null) ? Path.GetTempPath () : directory.GetPath ();
			do {
				file = Path.Combine (str, prefix + Interlocked.Increment (ref _tempCounter) + suffix);
			} while (File.Exists (file));
			
			new FileOutputStream (file).Close ();
			return new FilePath (file);
		}
コード例 #4
0
 public FileOutputStream(FilePath file, bool append) : this(file.GetPath(), append)
 {
 }
コード例 #5
0
 public FileOutputStream(FilePath file) : this(file.GetPath(), false)
 {
 }
コード例 #6
0
 public RandomAccessFile(FilePath file, string mode) : this(file.GetPath(), mode)
 {
 }
コード例 #7
0
		public RandomAccessFile (FilePath file, string mode) : this(file.GetPath (), mode)
		{
		}
コード例 #8
0
 public FileInputStream(FilePath file) : this(file.GetPath())
 {
 }
コード例 #9
0
ファイル: FileWriter.cs プロジェクト: smile921/kh_blog
 public FileWriter(FilePath path) : base(path.GetPath())
 {
 }
コード例 #10
0
		public FileInputStream (FilePath file) : this(file.GetPath ())
		{
		}