Lines Matching refs:path
18 public FilePath(string path, FileAccess fileAccess, bool validate = true) in FilePath() argument
20 this.path = path; in FilePath()
31 if(!File.Exists(path)) in Validate()
38 using(var fs = File.Open(path, FileMode.Open, fileAccess, FileShare.ReadWrite)) in Validate()
58 return path; in ToString()
63 return fp.path; in operator string()
68 if(File.Exists(path)) in CanBeCreated()
75 using(File.Create(path)) in CanBeCreated()
78 File.Delete(path); in CanBeCreated()
88 protected readonly string path; field in Antmicro.Renode.Utilities.FilePath
94 public ReadFilePath(string path) : base(path, FileAccess.Read) {} in ReadFilePath() argument
96 public static implicit operator ReadFilePath(string path) in operator ReadFilePath() argument
98 return new ReadFilePath(path); in operator ReadFilePath()
104 public OptionalReadFilePath(string path) : base(path, FileAccess.Read, false) in OptionalReadFilePath() argument
106 if(path != null) in OptionalReadFilePath()
114 return fp?.path; in operator string()
117 public static implicit operator OptionalReadFilePath(string path) in operator OptionalReadFilePath() argument
119 return new OptionalReadFilePath(path); in operator OptionalReadFilePath()
130 public AppendFilePath(string path) : base(path, FileAccess.Write) {} in AppendFilePath() argument
132 public static implicit operator AppendFilePath(string path) in operator AppendFilePath() argument
134 return new AppendFilePath(path); in operator AppendFilePath()
140 public WriteFilePath(string path) : base(path, FileAccess.Write) {} in WriteFilePath() argument
144 if(!File.Exists(path)) in Validate()
156 public static implicit operator WriteFilePath(string path) in operator WriteFilePath() argument
158 return new WriteFilePath(path); in operator WriteFilePath()
164 public SequencedFilePath(string path) : base(path) {} in SequencedFilePath() argument
168 if(!File.Exists(path)) in Validate()
177 var lastSplit = path.LastIndexOf(Path.DirectorySeparatorChar); in Validate()
183 var dirPath = path.Substring(0, lastSplit); in Validate()
184 var fileName = path.Substring(lastSplit + 1); in Validate()
188 .Select(path => path.Substring(path.LastIndexOf('.') + 1)) in Validate()
194 var newPath = string.Format("{0}.{1}", path, lastIndex + 1); in Validate()
198 File.Move(path, newPath); in Validate()
205 Logger.Log(LogLevel.Info, "Old file {0} moved to {1}", path, newPath); in Validate()
213 public static implicit operator SequencedFilePath(string path) in operator SequencedFilePath() argument
215 return new SequencedFilePath(path); in operator SequencedFilePath()