Sorry, I try to make myself clear.
I had created an encrypted folder following these steps How to create a password-protected (encrypted) disk image - Apple Support
When the folder was almost full I tried to modify its capacity, however I had the same problem of this user Encrypted Disk Image Won't Partition After Resize
I followed the suggestion in the page the user used to solve the problem in this page http://blog.kyodium.net/2010/11/increase-disk-and-partition-size-in.html
but the solution didn't work and the partition is not visible anymore.
These are the steps I took with no use following the instructions in that blog
Last login: Sun Mar 27 23:02:51 on console
MacBook-Pro:~ synchronicity$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487932936 321476512 165944424 66% 40248562 20743053 66% /
devfs 379 379 0 100% 656 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk2s9 9178680 7609528 1569152 83% 951189 196144 83% /Volumes/GhostDog
MacBook-Pro:~ synchronicity$ umount /dev/disk2s9
umount(/Volumes/GhostDog): Resource busy -- try 'diskutil unmount'
MacBook-Pro:~ synchronicity$ umount -f /dev/disk2s9
MacBook-Pro:~ synchronicity$ gpt show /dev/disk2
start size index contents
0 19980000
MacBook-Pro:~ synchronicity$ umount /dev/disk2s9
umount: /dev/disk2s9: not currently mounted
MacBook-Pro:~ synchronicity$ gpt destroy /dev/disk2
gpt destroy: /dev/disk2: error: device doesn't contain a GPT
MacBook-Pro:~ synchronicity$ gpt create -f /dev/disk2
gpt create: unable to open device '/dev/disk2': Resource busy
MacBook-Pro:~ synchronicity$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487932936 321467256 165953680 66% 40247405 20744210 66% /
devfs 379 379 0 100% 656 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk2s9 9178680 7609536 1569144 83% 951190 196143 83% /Volumes/GhostDog
MacBook-Pro:~ synchronicity$ umount -f /dev/disk2s9
MacBook-Pro:~ synchronicity$ gpt destroy /dev/disk2
gpt destroy: /dev/disk2: error: device doesn't contain a GPT
MacBook-Pro:~ synchronicity$ umount -f /dev/disk2s9
MacBook-Pro:~ synchronicity$ gpt create -f /dev/disk2
MacBook-Pro:~ synchronicity$ gpt add -b 0 -s 19980000 /dev/disk2
usage: gpt add [-b lba] [-i index] [-s lba] [-t uuid] device ...
MacBook-Pro:~ synchronicity$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487932936 321468368 165952568 66% 40247544 20744071 66% /
devfs 369 369 0 100% 642 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
MacBook-Pro:~ synchronicity$ gpt show /dev/disk2
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 19979933
19979967 32 Sec GPT table
19979999 1 Sec GPT header
MacBook-Pro:~ synchronicity$ umount /dev/disk2s9
umount: /dev/disk2s9: not currently mounted
MacBook-Pro:~ synchronicity$ umount -f /dev/disk2s9
umount: /dev/disk2s9: not currently mounted