Delphi Can
Klasör oluşturma - Baskı Önizleme

+- Delphi Can (https://www.delphican.com)
+-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3)
+--- Forum: Mobil Platform - FireMonkey (FMX) (https://www.delphican.com/forumdisplay.php?fid=7)
+--- Konu Başlığı: Klasör oluşturma (/showthread.php?tid=953)



Klasör oluşturma - quiet1day - 06-05-2017

Forumda araştırdım varmıydı bulamadım varsa kusura bakmayın ,
Telefon Hafızasına (sd card değil ) Yeni Klasör oluşturma nasıl olur ?


Klasör oluşturma - meko - 07-05-2017

Merhaba,

uses'a System.IOUtils ekle

System.IOUtils.TPath kullanarak klasör oluşturacağın pathı seç
seçeneklerin

class function GetTempPath: string; static;
class function GetHomePath: string; static;
class function GetDocumentsPath: string; static;
class function GetSharedDocumentsPath: string; static;
class function GetLibraryPath: string; static;
class function GetCachePath: string; static;
class function GetPublicPath: string; static;
class function GetPicturesPath: string; static;
class function GetSharedPicturesPath: string; static;
class function GetCameraPath: string; static;
class function GetSharedCameraPath: string; static;
class function GetMusicPath: string; static;
class function GetSharedMusicPath: string; static;
class function GetMoviesPath: string; static;
class function GetSharedMoviesPath: string; static;
class function GetAlarmsPath: string; static;
class function GetSharedAlarmsPath: string; static;
class function GetDownloadsPath: string; static;
class function GetSharedDownloadsPath: string; static;
class function GetRingtonesPath: string; static;
class function GetSharedRingtonesPath: string; static;

pathı bir değişkene aldıktan sonra

System.IOUtils.TDirectory.CreateDirectory ile klasörü oluşrurabilirsin


Klasör oluşturma - meko - 07-05-2017

Merhaba,

TPath.DirectorySeparatorChar klasor ayracını path ile yeni klasör arasında kullanman gerekebilir.

TPath.GetHomePath() + TPath.DirectorySeparatorChar + 'YeniKlasor'
gibi


Cvp: Klasör oluşturma - quiet1day - 07-05-2017

(07-05-2017, Saat: 20:36)meko Adlı Kullanıcıdan Alıntı: Merhaba,

TPath.DirectorySeparatorChar klasor ayracını path ile yeni klasör arasında kullanman gerekebilir.

TPath.GetHomePath() + TPath.DirectorySeparatorChar + 'YeniKlasor'
gibi

procedure TForm1.Button1Click(Sender: TObject);
var
yol : string;
begin
 yol:=TPath.GetHomePath() + TPath.DirectorySeparatorChar + 'YeniKlasor';
    TDirectory.CreateDirectory(yol);
end;

şeklinde yaptım çalışmıyor hocam


Klasör oluşturma - meko - 07-05-2017

Merhaba,

TPath.GetSharedDocumentsPath ile denedim oldu

TPath.GetHomePath() neden olmadı, bilgim/yorumum yok


Not : dosya uzantısını rar yaptıktan sonra açınız.


Klasör oluşturma - quiet1day - 08-05-2017

(07-05-2017, Saat: 22:53)meko Adlı Kullanıcıdan Alıntı: Merhaba,

TPath.GetSharedDocumentsPath ile denedim oldu

TPath.GetHomePath() neden olmadı, bilgim/yorumum yok


Not : dosya uzantısını rar yaptıktan sonra açınız.

Teşekkür ediyorum hocam