Home | History | Annotate | Download | only in base

Lines Matching full:pathname

60 // Pathname - parsing of pathnames into components, and vice versa
63 bool Pathname::IsFolderDelimiter(char ch) {
67 char Pathname::DefaultFolderDelimiter() {
71 Pathname::Pathname()
75 Pathname::Pathname(const std::string& pathname)
77 SetPathname(pathname);
80 Pathname::Pathname(const std::string& folder, const std::string& filename)
85 void Pathname::SetFolderDelimiter(char delimiter) {
90 void Pathname::Normalize() {
98 void Pathname::clear() {
104 bool Pathname::empty() const {
108 std::string Pathname::pathname() const {
109 std::string pathname(folder_);
110 pathname.append(basename_);
111 pathname.append(extension_);
112 if (pathname.empty()) {
113 // Instead of the empty pathname, return the current working directory.
114 pathname.push_back('.');
115 pathname.push_back(folder_delimiter_);
117 return pathname;
120 std::string Pathname::url() const {
133 void Pathname::SetPathname(const std::string& pathname) {
134 std::string::size_type pos = pathname.find_last_of(FOLDER_DELIMS);
136 SetFolder(pathname.substr(0, pos + 1));
137 SetFilename(pathname.substr(pos + 1));
140 SetFilename(pathname);
144 void Pathname::SetPathname(const std::string& folder,
150 void Pathname::AppendPathname(const std::string& pathname) {
152 full_pathname.append(pathname);
156 std::string Pathname::folder() const {
160 std::string Pathname::folder_name() const {
172 std::string Pathname::parent_folder() const {
184 void Pathname::SetFolder(const std::string& folder) {
192 void Pathname::AppendFolder(const std::string& folder) {
200 std::string Pathname::basename() const {
204 bool Pathname::SetBasename(const std::string& basename) {
212 std::string Pathname::extension() const {
216 bool Pathname::SetExtension(const std::string& extension) {
229 std::string Pathname::filename() const {
235 bool Pathname::SetFilename(const std::string& filename) {
245 bool Pathname::GetDrive(char *drive, uint32 bytes) const {
250 bool Pathname::GetDrive(char *drive, uint32 bytes,
251 const std::string& pathname) {
253 if (bytes < 4 || pathname.size() < 3) {
257 memcpy(drive, pathname.c_str(), 3);