MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / makeDir

Method makeDir

tools/aapt/AaptAssets.cpp:1713–1730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1711}
1712
1713sp<AaptDir> AaptDir::makeDir(const String8& path)
1714{
1715 String8 name;
1716 String8 remain = path;
1717
1718 sp<AaptDir> subdir = this;
1719 while (name = remain.walkPath(&remain), remain != "") {
1720 subdir = subdir->makeDir(name);
1721 }
1722
1723 ssize_t i = subdir->mDirs.indexOfKey(name);
1724 if (i >= 0) {
1725 return subdir->mDirs.valueAt(i);
1726 }
1727 sp<AaptDir> dir = new AaptDir(name, subdir->mPath.appendPathCopy(name));
1728 subdir->mDirs.add(name, dir);
1729 return dir;
1730}
1731
1732void AaptDir::removeFile(const String8& name)
1733{

Callers 1

addResourceMethod · 0.80

Calls 3

addMethod · 0.65
indexOfKeyMethod · 0.45
valueAtMethod · 0.45

Tested by

no test coverage detected